Back

Mimic Translation Table in a Calculated Field

Published: Sep 28, 2016
Post Author Written by eOne Solutions

I would like to use the result of my Translation Table with another value in a calculated field. Can this be done?


Only by writing the Translation logic in the calculated field but not usi mimic the logic found in the Translation Table column Additional Column type.

ng the actual translation table additional column.

In my example below, we are taking the result of the translated value and adding a 01 to the end. The Case and the switch statements


Using VB.NET, we use a Select statement for the translation logic.

Dim translationResult as string
Select Case _MYSOURCECOLUMN
Case 1
  translationResult = “Invoice”
Case 2
   translationResult = “Credit Memo”
Case Else
   translationResult = “Invoice”
End Select

 

‘Add the 01 suffix
Return translationResult & “01”

 


Using C#, we use a switch statement for the translation logic.

string translationResult;
switch (_MYSOURCECOLUMN)
{
case 1:
   translationResult = “Invoice”;
   break;
case 2:
   translationResult = “Credit Memo”;
   break;
default:
   translationResult = “Invoice”;
   break;
}

/*Add the 01 suffix*/
return translationResult + “01”;

 

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

We're on your integration team. Connect with our people and let us know how we can help you.