Crow Canyon Software Forum
Don't process blank values at the end of an array
Quote from pf-amalin on March 4, 2024, 6:25 pmUSE CASE:
We have a custom action where a user enters a number of values into an array variable, and then a loop action creates items based on those values.ISSUE:
Users will often press <Enter> when done rather than leaving the cursor at the end of the line of the last value. This causes a record to be created using an empty value which then has to be deleted.QUESTION:
How can we get the loop to only process the array value only if it Is Not Empty as done when using a condition?
USE CASE:
We have a custom action where a user enters a number of values into an array variable, and then a loop action creates items based on those values.
ISSUE:
Users will often press <Enter> when done rather than leaving the cursor at the end of the line of the last value. This causes a record to be created using an empty value which then has to be deleted.
QUESTION:
How can we get the loop to only process the array value only if it Is Not Empty as done when using a condition?
Quote from supportTeam on April 8, 2024, 5:49 pmHi @pf-amalin,
Please find steps to create a gateway in the custom action and check for the blank value:
Edit the required custom action > Drag and drop ‘Create Gateway’ event on to the canvas after the loop control > Add below condition in the gateway > Save settings > Publish the custom action.
Syntax: Advanced Condition ‘not equal’ $GetIterationValue(Loop Control Name),,
Example: Advanced Condition ‘not equal’ $GetIterationValue(Run for all users),,
Please refer to the attached images for details.
Hi @pf-amalin,
Please find steps to create a gateway in the custom action and check for the blank value:
Edit the required custom action > Drag and drop ‘Create Gateway’ event on to the canvas after the loop control > Add below condition in the gateway > Save settings > Publish the custom action.
Syntax: Advanced Condition ‘not equal’ $GetIterationValue(Loop Control Name),,
Example: Advanced Condition ‘not equal’ $GetIterationValue(Run for all users),,
Please refer to the attached images for details.
Uploaded files: