- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 04:04 AM - edited ‎03-08-2024 04:09 AM
1. I have a reference field on UI page review_request, referencing to the sys_user table. I have written a query to filter out the members which are active=true and has role ITIL. When searched by clicking on magnifying glass on that field, the window displays correct records. But when I type in the name, it displays all the relevant records; even those which does not satisfy above condition. Is this behavior OOB? If not, any solution for this?
2. The dictionary attributes have been applied to the same field to refer to the columns User ID, first name and last name which searching a particular record. User ID in our case is mix of alphabets and numbers. When I type in name, it filters out the records by Name contains......or Name starts with..... Is this OOB? and if searched with exact user ID, it has no records to display because it is searching on Name field only. Is there any solution?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 04:16 AM - edited ‎03-08-2024 04:18 AM
Use this, you will get correct results
<g:ui_reference name="manager" completer="AJAXTableCompleter" query="active=true^roles=ITIL" id="manager" table="sys_user" columns="user_name;first_name;last_name" />
Guess his answers your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 04:34 AM
Ohh i didnt realize you edited the question,
Yes the search is always starts with, unless users enters * and then types something. This is OOB.
Basically this field on the ui page should work same as it does on any form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 04:36 AM
Okay, but every time it is filtering the Name column only. I have a requirement that it should filter the users based on the entered UserID as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 04:51 AM
That works with the ref_ac_column and ref_ac_columns_search=true attributes, I havent used them in a ui page myself but try and see if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 05:08 AM
Try this way
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************