- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi everyone,
I’m working on a flow where I’m using the Look Up Records action on the Email [sys_email] table. I want to filter records based on the Target table field so that it only returns emails where the target table name contains or starts with the word “software”.
However, when I add the Target table condition, the only available operators are is, is not, and is anything (see screenshot below). There’s no option for contains or starts with, which limits how I can filter dynamically by partial table names.
Is there any alternative approach or workaround to achieve this?
Any suggestions would be appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
target_table is part of document ID field and hence that limitation.
use script and give this encoded query in condition and it worked for me
I used IN operator
Output: Count for matching records 3
Email log table with same filter also has 3 records
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
target_table is part of document ID field and hence that limitation.
use script and give this encoded query in condition and it worked for me
I used IN operator
Output: Count for matching records 3
Email log table with same filter also has 3 records
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Thanks that looks good. @Ankur Bawiskar
I was wondering if there was also any other way to achieve this avoiding the scripting step as I have a few other conditions as well as the target table is software. Do you know if anything can be done with flow variables and then pass it only for that condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Glad to know that my approach worked for you.
Yes you can try to use flow variable but the issue is again the same.
the operator IN is not allowed, so I believe using scripting in condition is the only way forward.
1 thing you can do is -> store your tables in flow variables and use that flow variable in your condition script.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Flow Designer’s Look Up Records action exposes reference-type operators (is, is not, is anything) — it doesn’t allow string-based operators like contains or starts with since it expects a specific referenced record rather than a text match.
You can add a inline Script action after your Look Up Records to filter the results programmatically.
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.