pop up message when selecting a specific item from the list collector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 05:02 AM
I have a list collector , when selecting a specific item , a pop up message should be shown . I have an on-change client script to meet this requirement:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue=="8444356d6fc00200512f5e354b3ee426")
{
alert('MY MESSAGE');
}
}
this code works , but the problem is when selecting other items , this message will pop up again! I need the pop up to happen only once! and when that specific item is selected!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 05:07 AM
HI Soni,
You need to use this
g_form.clearValue('variable_name'); // your variable name.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 05:09 AM
where should I use this? and by the 'variable_name' , do you mean my list collector?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 09:13 AM
Soni,
Write an onChange client script on your list collector variable and add this script in there.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue.toString().indexOf("8444356d6fc00200512f5e354b3ee426")>-1){
alert('your message');
}
}
Thanks,
Abhinay
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 11:45 AM
Thanks again for all your help. i have a question on this :
can we set this up in a way that once selected and it is located in the right bucket so it should show the pop up and that works fine, but when adding another item to it , it again shows the pop up and that's something I don't want . and with my code and your codes it still shows the pop up.