Show field message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 10:06 PM
Hi Developers,
I have a list collector field called macro_module.
This variable drop-down does not have an option called 'Knowledge'.
When an end user search for 'Knowledge' on this variable. I want to show a field msg.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 10:23 PM - edited 02-07-2024 12:00 AM
Try this :
var Value = newValue.getDisplayValue();
if (Value.indexOf("know") > -1)
{
// your logic here...
}
I hope this helps...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 10:47 PM
try this also, try to log the value inside and outside of If conditions to see where it blocks....
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 11:29 PM
Hi,
I tried your script & alert conditions.
We are unable to enter into If condition to check the field contains "Knowledge".
Out side if poping up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 11:45 PM
Hello @Naveen87 ,
As per my knowledge, a list collector variable uses a reference to a table using sys_ids, so it will not consider the text untill we select any choice in it . So, the client script might not trigger as expected because the choice is not selected, because there is no any choice for that text. you can test this by adding infomessage and see without any conditions the client script is triggering or not.
Even if we try using functions like 'includes,' since we have not selected any choice in it will prevents it from working.
Instead, a straightforward solution could be to use help text. We can add clear instructions there.
Please le me know your views and Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Aniket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 01:21 AM
Hi @Aniket Chavan ,
Help text would show the msg all the time. Which isn't ideal situation here.
I had also tried onChnage field msg which works fine. When some value is selected on variable. It shows the msg.
So it's not possible to show msg when Knowledge is searched on the Variable?