and more in a single search tool across platforms. Read the announcement here. |
11/06/2023 03:43 AM - last edited on 11/07/2023 02:13 AM by Sunil
In a REST connector implementation, based on the country what user has selected in dynamic form (value stored in accountCP26) on ARS page we need to assign the language value. The values would be AE - Armenia, PL - Poland etc. Hence, we are just reading the first 2 alphabets. However, the below syntax is not working as expected. The else condition value 'en_US' is getting mapped by default. Can you please confirm if there is any syntax issue with the substring or tostring conversion?
\"language\":\"${if(requestAccessAttributes.customproperty26.toString().substring(0,2)=='AE') 'ar_AE' else if(requestAccessAttributes.customproperty26.toString().substring(0,2)=='AL') 'es_US' else 'en_US'}\"
Or if there is any alternative way or logic to achieve this requirement, kindly suggest.
[This message has been edited by moderator to merge reply comment]
11/07/2023 11:40 AM
Can you try with request_access_attrs.customproperty26 instead. Also, you can refer the below form link to check for the format of if else clause.
11/07/2023 08:00 PM
\"language\":\"${if(request_access_attrs?.customproperty26.toString().substring(0,2)=='AE') 'ar_AE' else if(request_access_attrs?..customproperty26.toString().substring(0,2)=='AL') 'es_US' else 'en_US'}\"