Flow designer if condition help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 05:47 AM
Hello There
I have a requirement where the flow is triggered ,when the RITM is created , in a section we need to check if the user provided value in a string variable is "Pedcs" or "Rad Onco" we have 200 like this , what is the best way to add these , so that we can maintain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 06:02 AM
HI @RudhraKAM ,
I trust you are doing great.
To achive this you can create a custom action in which the variable will be one input .
You can store all the keywords as comma seperated in the system property .
In custom action script get the value of system property and split it will "," to generate the array for the same.
Then check if the variable present as a part of that array or not , if yes return true else false.
sample code :
// Define the keywordString and input variables
var keywordString = 'Pedcs,Rad Onco,abc';
var input = 'Rad Onco';
// Split the keywordString into an array
var keywords = keywordString.split(',');
// Find the index of the input variable within the array
var index = keywords.indexOf(input);
// Check if the input variable was found in the array
if (index !== -1) {
console.log('The input variable was found at index', index);
} else {
console.log('The input variable was not found in the array');
}
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 06:02 AM - edited 06-23-2023 06:13 AM
@Amit Gujarathi Can you please help me with step by step process , I am new to this flow designer
I created a property
Created a Custom action ( not sure if i am doing this in correct way )
Input value I mentioned is the variable name from the flow
what should i do next ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 06:04 AM
Hello @RudhraKAM
One approach would be to create a custom table with one record for each value. Then in your flow query that table and for each record i that table, have if condition defined to check with variable value.
You can do it with script as well, but the table approach would be clean one to future value addition/removal.
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 06:15 AM
Thanks @Ahmmed Ali - @Amit Gujarathi
If I want to add that in the flow condition itself , is it ',' separated ?