Retrieve specific value from array field in flow designer condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2024 09:20 PM - edited 01-15-2024 09:24 PM
Hi Team ,
I have a requirement where i need add a condition to retrieve specific value from array.object field in flow designer condition so that based on that value task will generated.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2024 09:39 PM
Hi @Anupriya_11
I guess this is not possible with available functionality.
Therefore, I recommend extracting that value and store it in a Flow variable. That Flow variable then can be used in the condition builder.
Maik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2024 09:43 PM
Hi,
can you please explain your use case with an example?
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 09:44 PM - edited 01-17-2024 09:45 PM
Hi Anil
There is a variable set , in which it has multiple choice
Please select
A ,B
If 'A'option is selected it needs to create a catalog task for particular group(ex: group A)
And if 'B' option is selected it needs to create a catalog task for particular group(ex: groupB)
How can I resolve this? It needs to go for individual groups.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 03:46 AM
Sure, you can achieve this by using the "If" logic in the Flow Designer. Here are the steps:
1. Open the Flow Designer in ServiceNow.
2. Create a new flow or open an existing one.
3. Add an "If" logic to your flow.
4. In the "If" logic, you can add a condition to check the specific value in the array.object field.
5. Use dot-walking to access the specific value in the array.object field. For example, if you have an array named 'myArray' and it has an object field named 'myField', you can access the specific value by using 'myArray.myField'.
6. Set the condition to check if 'myArray.myField' equals (or not equals, greater than, less than, etc.) to the specific value you want to check.
7. If the condition is true, you can add an action to generate a task.
8. If the condition is false, you can add another action or leave it blank.
Here is a sample code for the condition:
if (myArray.myField == 'specific value') {
// Add action to generate a task
}
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - nowgpt.ai