- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 11:56 AM
I have attempted to convert some async business rules to flows. The business rule filter conditions included some javascript in the values, for example javascript:gs.getProperty('my_property_name')
The business rules trigger as expected.
However, if I configure the same condition into the flow, like this...
...when I minimise the Trigger section of the Flow form, the summary of the trigger shows 'undefined', e.g. 'Correlation Display is undefined'.
Testing shows that the flow does not trigger.
If I amend the conditions to remove the javascript from the condition and replace it with static value, the Flow triggers.
Can anyone advise if what I'm trying to do is supported in Flow Designer?
Thanks.
Stuart.
Solved! Go to Solution.
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 02:03 AM
ServiceNow have confirmed this is not currently possible with Flow trigger filter conditions. They've suggested raising an enhancement if I feel the functionality would be of wider benefit. I'm happy to take feedback on that through this thread.
To achieve my desired outcome I used a hybrid approach, using business rules to act as the trigger - allowing me to use javascript in the filter conditions where required - and adding a scripted call to a subflow (code snippet tool in flow designer makes this pretty easy).
It means there are more 'moving parts' in the solution that if I'd used either just Flow or just business rules, but I'm keen to leverage Flow with an eye on future support and the direction of travel of the platform towards Flow Designer-based solutions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 11:58 AM
can you try removing javascript and check
gs.getProperty('my_property_name')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 12:06 PM
If Asif's suggestion doesn't work, you may need to create an action to get the value as an output and use it in the condition
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 12:15 PM
As I've said in the question body, if I replace the the javascript with a static value, the flow triggers. That's not the solution I need.
The context is I want to make triggering as precise as possible - similar to how I can use javascript in a business rule condition value - and not rely on triggering the flow to then apply further conditions in an action.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 12:28 PM
If javascript doesn't work, thats the best option. You can re-use that action in other flows as well, where input will be the property name and output will be the value. I don't see a problem doing that.
Please mark this response as correct or helpful if it assisted you with your question.