How to fetch the value of field in a flow via system property instead of hardcoding?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi Experts,
I want to check the value of field in my flow using a system property instead of hardcoding. I can do that in a Create a Record Action, using toggle script, but I'm unable to see that script toggle in If flow logic condition.
Please refer this ss and let me know how I can use a system property here.
One thing, I'm unable to see the Get Property action as well in my instance.
Thanks in advance,
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi @Anand Kumar P and @Mohammed8 ,
Thank you for replying. I'll check that solution which you provided and let you know the updates. And one thing is that to look up record in sys property table, I need to create my flow in global scope right, mine is in custom scope.
I'll check and let you know.
Thank you,
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I won't recommend using Lookup on sys_property which is a system table and will lead to performance issue.
Please use flow variable approach
I shared approach with screenshots.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
You can use Flow variable as mentioned by @SanjivMeher
Create flow variable of type True/False
Just ensure you set that using "Set Flow Variables" flow logic something like this
var arr = gs.getProperty('propertyName').split(','); // this holds comma separated sysIds as string
var createdRecordSysId = fd_data. < step1SysId > ;
if (arr.indexOf(createdRecordSysId) > -1)
return true;
else
return false;
Then use in IF logic as to check if value is true/false
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Amol,
So for this there can be two options.
1: You can create a flow variable and store the value there and use it as required.
2: Before your desired step, you can use look up record and fetch the value beforehand.
I personally go with the second approach.
If this works for you, please mark my response as solution.
