cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JBSF
Level: Powered On

Filtering an array variable

Is there a way to filter an array variable? 

 

I have a flow triggered by a button in a Sharepoint list that will filter the list, create an HTML table, and send the table in an email.  The user triggering the flow has several Yes/No options for what items to filter for (Choice A and Choice B).  I would like my flow to to be formatted roughly like so: Trigger-> Initialize "Placeholder" Array ->Initialize "List" Array -> Initialize "Choice Array A" -> Initialize "Choice Array B" -> Append user choices for A to Choice Array A -> Append user choices for B to Choice Array B -> Get items from list -> For each value of Choice Array A[ Filter list -> Create HTML table -> Append Table to Placeholder Array] -> For each value of Choice Array B[Filter Placeholder Array ->Create HTML table ->Append Table to List Array]  -> Send email with List Array in Body.

 

The issue I am facing is that the Filter Array function does not work on an Array variable storing an HTML table.  When I try, I receive an error ending with "Property selection is not supported on values of type 'String.'"  Is there another way I can format my flow to achieve this affect?  Thank you for the help.

4 REPLIES 4
Community Support Team
Community Support Team

Re: Filtering an array variable

Hi @JBSF,

 

Could you please share a screenshot of the configuration and the run failed history of your flow?

Could you please share more details about your requirement?

Do you mean you couldn't add item from "Create html table"to "Placeholder" Array and "List" Array?

 

If yes, I have made a test on my side and please take a try with with my screenshot to add the "Select" action as below:

Capture.PNG

Capture.PNG

 

The fow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

 

WDRC
Level: Powered On

Re: Filtering an array variable

Okay, I think this is what I may need but not sure.

 

I have a single SP list (members) in that list I have items that I can select either a full or associate member and another item has other multiple items in (see below).

 

What I want to do is to create a CSV (which I have done sucessefully) but it seems to send out a single file for associate members only and not the full.  I was doing the slection of this list item via an "if" statement i.e. "if" full, then move on "if" associate then go create csv and send via email. 

 

I think I need a variable for "Full" and another for "Associate" then combine these before I start to write the data to the CSV which i then use the combined field in that part of the CSV file creation.

 

If I can get the full and associate working, I should be able to combine the other item that has the follwing items I can select which are CR, or PP, or PH or FM.  This should write the all or none of these to a single cell in excel.  Using a similar method above.

 

Any advice would be apprecitated.

 

Andrew

 

 

Sorry for all the text I hope you understand 

WDRC
Level: Powered On

Re: Filtering an array variable

Membership flow list.png

 

 

Highlighted
JBSF
Level: Powered On

Re: Filtering an array variable

Thank you for the suggestion!  I have tried to replicate the steps of your flow, but my flow keeps failing at the 'Select' step.  I receive an error saying the item cannot be evaluated because the property I have selected does not exist.  I also receive this same error when I make any change in my flow that contains a 'Create HTML Table' step.  Could these be related?  Is there a way to resolve this?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 171 members 5,940 guests
Please welcome our newest community members: