I currently have a validation using an IF statement where it conditions workflow direction if the variable “hospital_name” is equal to ‘Hospital Zambrano’. Now I need to add at least 10 more hospital names to that condition, what would be the most simplified way to be able to do it without using multiple OR conditions?
I thought about putting the list of names in a txt and creating a variable as an array with those names, but I can’t get the idea to land.
I think you can put the list of the names in a txt file, using comma or like a column list.
When you read the txt file, you will get ONE variable (with the whole text in it).
And then you can use activity text found to find the certain text in it.
You can also use split function in javascript, for example:
read text file - save the results in variable results_text
split variable results_text, using split function in javascript. In this case you need to select a separator in function split. As a result you will get an array
// results_array = results_text.split(“,”)