web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Filtering out string f...
Copilot Studio
Unanswered

Filtering out string from an array/ string/ Looking for any viable solution

(0) ShareShare
ReportReport
Posted on by 5

Hello Good people of the forum!

 

I need your help. I work at the helpdesk of a small startup and am just a noob in power virtual agent. I read some content and even though I am not from computer science background, I thought I could also build a "no code bot". The idea is very simple: The bot will greet and then ask for email. After the user provides email, the bot will check if the email address belongs to a group, if yes, it will send an email with the user query to the sales team. If not, then the bot will give the user a link to fill up a form. 

So far, I have done the following:

IamAlexis_0-1654756966123.png

The bot asks for the email input and I stored the value in a string variable.

In the next step, I list the group members

IamAlexis_1-1654757209665.png

Then I filter the query and set a condition where if the result is greater than 0, I should get a true value otherwise false.

greater(length(body('Filter_array')),0). I pass the value from compose to the pva. 

IamAlexis_2-1654757344520.png

 

It is not working. I tried a couple of different filtering parameters as well but nothing is working 😞 I either get true for all or false for all. the email is under "mail" in the array. I will try and figure out the next steps if I can get past this. If this is not at all the right approach, would greatly appreciate pointing or nudging towards the right direction.

Looking forward to some help and guidance. 

 

Best,

Alexis

I have the same question (0)
  • Verified answer
    SupportBryn Profile Picture
    Microsoft Employee on at

    Hey there @IamAlexis,

     

    I don't necessarily know that this will fully fix the issue, but a good place to start can be simplifying your comparison there, to help break out the steps individually. Instead of doing that compose there, what you can do is add a condition branching action, and make use of the empty() expression, which is a more direct way to check if the array from your filtering has any items in it.

     

    You can set up the comparison where you check if empty(<the output of Filter Array>) is equal to false (that exact value, no capitalization and no quotes around it). If that is the case, then you know that you had an email address that matched the input and proceed from there, otherwise you can return whatever value you are using as the default value for not having found it.

     

    Hope that helps you start making progress! Let me know if there's more we need to do.

     

    Thank you for using Microsoft Power Platform Communities!
    Bryn Baker
    Support Engineer
    Microsoft Power Platform
    If this post helps, then please consider accepting it as the solution to help other members find it more quickly! Have a great day!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard