- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 03:06 PM
Hello Team - Is there a way to add a message after the 'Yes/No' variable, is answered, ie:
After a User selects Yes, can you add a message pop up ie: "Please attach your quiz results to this Request"
Thank you.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 11:40 PM
Hi,
- Create a YES/No type variable[completed_quiz] I have made with this backend name
- Create a UI policy find images:Condition: completed_quiz | is | Yes
- click on dvanced & Set UI script type set to all
- add script as shown in the image
- Execute if true:
function onCondition() {
g_form.showFieldMsg("completed_quiz","Please attach your quiz results to this Request");
}
execute if false:
function onCondition() {
g_form.hideFieldMsg("completed_quiz",true);//backend name of the field should be changed
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 03:32 PM
You can add an onChange client script to the field with the following code:
if(newValue = "Yes"){
g_form.addInfoMessage("Please attach your quiz results to this Request");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 10:24 PM
I have updated it to use addInfoMessage. You can also use g_form.addErrorMessage("text to display") to show it as an error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 09:02 PM
Hello Winnie,
You could use to display a message after Yes/No variable.
g_form.showFieldMsg('<variable_name>', 'msg', 'info');
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 09:25 PM
Hi
you can simply do it onChange client script.
//Code on the field onChange client script
if (newValue == "Yes") { g_form.addInfoMessage("Please attach your quiz results to this request");
}
addInfoMessage is used to add information message in the form.
Other alternative is
showFieldMsg("variable name", "msg string");
This particularly shows message on the field rather then at the top unlike infoMessage.
Thanks
Sudhanshu