Is it possible to access literal value of a field? My scenario is such: I have a string field name HelperString which has literal content. The text literal is "Complained", "Sent", "Deleted", e.g. telling an invoice status. Now I have a field InvoiceStatus which is a character field of length 1 and has many values, such as "Complained" (literal value "C"), "Sent" (literal value "S"), and "Deleted" (literal value "D"). I would like to loop through values of InvoiceStatus and set InvoiceStatus's current value to be the one with name given in HelperString.
So is it possible to set value of a field using the name of the value that has been given as a string?
I have tried like this:
+++Define Field: FIELDS/+Name
+For Each Field InvoiceDataL
+++Set Value To Current Field: FIELDS/+Name
++Name Defined Field: FIELDS/+Name, WorkL<TextField1>, .Language
If WorkL<TextField1> == <FieldName.InvoiceStatus>
+For Each Field Value
+++Set Value To Current Field: FIELDS/+Name
++Name Defined Field: FIELDS/+Name, WorkL<TextField2>, .Language
If WorkL<TextField2> == WorkL<HelperString>
// Same value found, both TextField2 and HelperString have literal text, e.g. "Deleted".
// However, how can I find out now that InvoiceStatus's value Deleted has literal "D"? How can I assign this literal value to another field, e.g. WorkL<InvoiceStatus>?