How to add dynamic filter in ai search indexed sources
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
How to add dynamic filter like contact.account is dynamic of me in ai search indexed sources if we add it throws an error, how to resolve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
You cannot add contact.account = me directly into an AI Search Indexed Source filter in ServiceNow, because:
Indexed Source filters are evaluated at indexing time.
At indexing time, there is no logged-in user context, so me or gs.getUserID() cannot be resolved.
✅ Solution:
Do not put the dynamic filter in the Indexed Source.
Index all potentially relevant records in the Indexed Source.
Apply contact.account = me in the Search Profile or a Scripted Search Source, where filters run at query time and have access to the logged-in user context.
OR
If you want to go through Scripted Search Source, please go ahead with below steps:-Please accept my answer and mark as helpful/correct if it resolves your query.
Regards,
Nitish Saini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @ManikandanP7586
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it as accepted and close the thread so that it benefits future readers.