Compare Choice field with String field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 10:58 AM
On the Use table Country is a choice field is having country value example United States, I want to push UNITED STATES from integration then I want both the country to match and the user table country field should be set as United States which is a choice field..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 11:20 AM
@Ashish Kathait Convert both the strings to upper or lower case and compare. For e.g.
var country = 'UNITED STATES';
var values = [];
var sel = g_form.getElement('country');
for (var i=0, n=sel.options.length;i<n;i++) {
if (sel.options[i].value.toUperCase()==country.toUpperCase()){
g_form.setValue('country',sel.options[i].value);
}
}
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 11:28 AM
Thanks Sandeep, looks good but I want to do it with Business Rule as Country is coming from different Data source into User table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 11:23 AM
The ideal solution is to use the script part of the field mapping to change the values from Integration to either Lower Case, Upper Case, or Camel Case based on the pattern of your existing country choice values and return the value.
Make sure you're using the Ignore or Reject "Choice Action" to handle the invalid choices that come from Integration and are created in the country's choice field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 06:41 AM
Not using Transform map, directly data is coming from Azure so have to write A BR on updated.