- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 03:28 AM
Hello,
I have make a flow condition in order to check if the array is empty or not ?
But when launch the test , it always return true evaluation in my flow and it always trigger the next action but I don't know how to do it ?
Screenshot Flow Condition :
Screenshot of test :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 09:01 AM
Hi @ericlung ,
how you can implement this in Flow Designer using JavaScript code:
- Add a "Script" step in your flow after the array is populated.
var myArray = current.myArray; // Replace "current.myArray" with your array variable
var arrayLength = myArray.length;
- Add a "Flow Condition" step after the script to check if the array length is equal to zero .
- Configure the subsequent action to be triggered when the condition is true
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 08:18 AM
I think the last one is messing you up but I don't think you need 3 checks. Just have - is not - and then leave the field empty. Does that work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 09:01 AM
Hi @ericlung ,
how you can implement this in Flow Designer using JavaScript code:
- Add a "Script" step in your flow after the array is populated.
var myArray = current.myArray; // Replace "current.myArray" with your array variable
var arrayLength = myArray.length;
- Add a "Flow Condition" step after the script to check if the array length is equal to zero .
- Configure the subsequent action to be triggered when the condition is true
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 11:01 AM
Your test results and Flow screenshot show different logic on the 3rd condition. You're using OR, change to AND instead.
