dynamic filter option on reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2020 10:06 PM
Hi All,
Can we define dynamic filter option on 'requested for' reference field as shown?
Can we use 'current' this way directly? Because the following script is not working at all.
Note: I am using this under default value related list with a reason to set default values when i click on lookup option. From reference qualifier i am returning something else and can't define the default values there.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2020 03:48 AM
I am calling it from dynamic filter option 9from default value related list option) not dynamic ref qualifier.. i am already using advanced ref qualifier to return certain set of values.
I doubt dynamic filter can be used for the same else i would have atleast got the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2020 03:15 AM
Hi,
from the script include you are returning the query
Can you share from where you are calling with screenshot
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2020 03:42 AM
I am calling the script include from dynamic filter option. screenshot i have attached above this comment.
I also tried with client callable option but that's not working either.
Now i doubt dynamic filter can be used for the same else i would have atleast got the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2020 02:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2020 03:08 AM
For a reference field 'requested for', I am trying to use dynamic filter option under default value related list.
I could have used advanced reference qualifier but the problem is there is already a script that is returning some set of user values(let's say 10users).
But initially, i want a default value of only 5 specific users to display on lookup(these 5 users are subset of users returning from advanced ref qualifier).
All 10 users should be visible only when we manually give filter condition.
So i am trying to handle this by using default value to first display 5users and later if i give the required filter all 10 users should be displayed.
Script written on advanced ref qualifier:
query = 'active=true^sys_domain=' + current.sys_domain + '^ORsys_domain=' + user.sys_domain;
return query.toString();
Script trying to return from dynamic filter:
query = 'active=true^sys_domain=' + current.sys_domain;
return query.toString();