electric_soul

Evaluate() won't evaluate correctly with getfieldname() function as parameter + curly brackets

Discussion created by electric_soul on Nov 23, 2018
Latest reply on Nov 29, 2018 by TSGal

FM Version

17.0.1.143

 

Scenario

Open some layout. Open the data viewer. Pick any field that is not related to the current LayoutTablename. Take the following code sample and replace the placeholder TABLENAME and FIELDNAME.

 

 

evaluate( "GetFieldName ( ${TABLENAME}::${FIELDNAME} )" )

 

Example

Using the fieldname datalog::id I get

 

evaluate( "GetFieldName ( ${DataLog}::${id} )" )

 

Run the code with your field

 

 

Result

Error message: "This field comes from an unrelated table"

 

What works

evaluate( "GetFieldName ( TABLENAME::${FIELDNAME} )" )

and the non-quoted version

GetFieldName ( ${TABLENAME}::${FIELDNAME} )

 

Workaround

none, unless changing the other system

Outcomes