cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tak103
Frequent Visitor

How to check if results is more when results is more than one

I am using an Excel to extract the results from the question. I will be using a compose action with the expression split("Yourtext",",") using the separator. So the result you will have separated data in an array variable instead of all the results combining into 1 string. How do I check if there are more than 1 results because if there are more than 1 results, I will need to send a msg to user to either refine the question or send e-mail to group for help.  Appreciate any guidance in advance.

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

Unfortunate, the answer length can vary. If I were to use split("Yourtext",",") using the separator to separate the results in an array variable. Will I be able to count how many is in the array variable? If this is a sound approach, would you be able to share with me how I can do this.

 

Thanks,

View solution in original post

5 REPLIES 5
Expiscornovus
Dual Super User
Dual Super User

Hi @Tak103,

 

You could use a length function in an expression to check the outputs of your compose action:

length(outputs('Compose'))

 

The expression could be used in a condition action with an operator like is greater than 1.

 

lengthoutputscompose.png

Unfortunate, the answer length can vary. If I were to use split("Yourtext",",") using the separator to separate the results in an array variable. Will I be able to count how many is in the array variable? If this is a sound approach, would you be able to share with me how I can do this.

 

Thanks,

Expiscornovus
Dual Super User
Dual Super User

Hi @Tak103,

 

That is why I suggested to use a length function, this type of function can count the number of items in an array. It doesn't matter how much items there are in that array, it will just output a number.

 

When the array has 3 items it will output 3. When it has 10 items it will output 10 as a result.

 

Can you share a screenshot of your current setup? I can adapt my previous example to your setup 😀

Tak103
Frequent Visitor

Thanks.  I am totally new to this so much appreciate it.

Expiscornovus
Dual Super User
Dual Super User

Hi @Tak103,

 

I don't see a screenshot. Can you try and attach it again to your post?

Helpful resources

Announcements
Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

Users online (3,792)