GetForeignFieldText

GetForeignFieldText is an OOB function to get the text which displayed to the user when they have selected a foreign key field. This is the rn_descriptor for the linked table.

If you are in a none Global Script you need to call it with this terminology

strMyFieldValue = Global.GetForeignFieldText(tabname, segmentname, fieldname); Within a global script, use

strMyFieldValue = GetForeignFieldText(tabname, segmentname, fieldname);