Using a variable as a field expression in functions
I would like to use a variable as a parameter in functions that take a field expression if possible.
For instance, the following syntax works.
I would like to use a session variable that would contain "SALES.COUNTRIES.COUNTRY_NAME", i.e. something like this.
This syntax does not work as expected. The function checks if "SALES.COUNTRIES.COUNTRY_NAME" string is in $country_list, it does not check the value of the SALES.COUNTRIES.COUNTRY_NAME field.
Is there a way to let Incorta know that $field should be interpreted as a field expression/reference and not as the actual string value?
I guess that you would like to evaluate different columns based on the login user? We can use CASE statement to accomplish this:
inList(SALES.COUNTRIES.COUNTRY_NAME, $country_list), 1=0)