- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2024 08:07 PM
I have created a custom field A in the user table.
*Custom field is a string.
Create a module for the user table.
Set a filter condition in the module: "Show records that have the same value as custom field A for the logged-in user."
How can I set this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2024 11:24 PM
Hello @bonsai,
As per information you have provided,
You have created a custom field A in the user table. And Custom field is a string.
You need to Create a module for the user table and want to Set a filter condition in the module: "Show records that have the same value as custom field A for the logged-in user." for that you can follow below steps:
Navigate> System Definition > Application Menus>User Administration (as per your choice)>Modules > New >fill other info including table = sys_user and Link type = List of Records > Filter ex. "A is javascript:gs.getUser().getRecord().getValue('A')."
You need to create dynamic filter to add condition so you can refer below articles for the same:
https://www.servicenow.com/community/developer-forum/how-to-create-a-module-that-filters-by-dynamic-...
https://www.servicenow.com/community/now-platform-forum/how-to-use-dynamic-filters-on-modules/m-p/11...
https://www.servicenow.com/community/now-platform-forum/how-to-use-dynamic-filters-on-modules/m-p/11...
https://www.servicenow.com/community/developer-forum/how-to-make-a-dynamic-filter-available-for-some...
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2024 11:24 PM
Hello @bonsai,
As per information you have provided,
You have created a custom field A in the user table. And Custom field is a string.
You need to Create a module for the user table and want to Set a filter condition in the module: "Show records that have the same value as custom field A for the logged-in user." for that you can follow below steps:
Navigate> System Definition > Application Menus>User Administration (as per your choice)>Modules > New >fill other info including table = sys_user and Link type = List of Records > Filter ex. "A is javascript:gs.getUser().getRecord().getValue('A')."
You need to create dynamic filter to add condition so you can refer below articles for the same:
https://www.servicenow.com/community/developer-forum/how-to-create-a-module-that-filters-by-dynamic-...
https://www.servicenow.com/community/now-platform-forum/how-to-use-dynamic-filters-on-modules/m-p/11...
https://www.servicenow.com/community/now-platform-forum/how-to-use-dynamic-filters-on-modules/m-p/11...
https://www.servicenow.com/community/developer-forum/how-to-make-a-dynamic-filter-available-for-some...
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2024 02:29 AM
Setting the script in the arguments field solved it!
Thanks!