- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 08:48 AM
I have added an info message via 2 separate Catalog UI policys as follows;
Conditions
Member Firm | Is | London
and
confirm_policy | is | No
Selected Advanced and selected the Run Script checkbox
Script
function onCondition() {{return g_form.addErrorMessage('Please confirm you have read the Global cyber security and information assurance policy. Select Yes to confirm.');}}
I then created another UI policy for french users
Conditions
Member firm | is France
And
confirm_policy | No
function onCondition() {return g_form.addErrorMessage('Veuillez confirmer que vous avez lu la Politique sur la cybersécurité. Sélectionnez Oui pour confirmer. ');}
When I test as a London user and Select no, the message appears as expected (GREAT!)
The same with a French user and it shows the french message (GREAT!
PROBLEM
When selecting a French/London user where the location is France and testing it. It gives the French Message instead of English.
What we want is that
- French London users show a English message
- French users show a french message
- London Users show and English message.
Can anyone suggest a script change that will work on the UI Policy.
Much apreaciated in advance!
Sarah
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 07:31 AM
Thanks so much Chuck,
I have just changed it to 'No' and it's working now for English, French and French/English users.
Final script (working as expected)
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
var cyber_policy = g_form.getValue('cyber_policy');
if (isLoading || cyber_policy == '') {
return;
}
if (cyber_policy == 'No') {
g_form.addErrorMessage(getMessage('cyber_policy'));
}
}
Thanks so much for all your help on this Chuck. Really appreciate it!
Regards
Sarah

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 07:17 AM
That helps. It's a Yes/No field so the value from g_form.getValue('cyber_policy") is going to be a "Yes" or "No". I just tested this with my own onChange script.
Is the onChange script on the cyber policy question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 07:31 AM
Thanks so much Chuck,
I have just changed it to 'No' and it's working now for English, French and French/English users.
Final script (working as expected)
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
var cyber_policy = g_form.getValue('cyber_policy');
if (isLoading || cyber_policy == '') {
return;
}
if (cyber_policy == 'No') {
g_form.addErrorMessage(getMessage('cyber_policy'));
}
}
Thanks so much for all your help on this Chuck. Really appreciate it!
Regards
Sarah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 07:38 AM
Hi Chuck,
For some reason I cannot mark the post as answered. I get no actions available when I click the link.
For me this has been answered and working as expected. Other users if they find it helpful.
Regards
Sarah

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 09:58 AM
Thanks Sarah. If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View.
Thank you