cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dobutsu
New Member

Filter array into two separate arrays

Hello guys.

Please help me, because i'm so dumb and spend so much time on this.

I have created form in Plumsail with name, phone, table with a couple of fields and amounts.

So, in flow, i parse it and stuck.

 

I need to separate an array into two array by category of the product in my table, create 2 docx files out of them and send them to two different e-mails.

I just dont what instrument to use. Condition not working, filter not good for my case.

 

Please help.

4 REPLIES 4
Community Support
Community Support

Re: Filter array into two separate arrays

Hi @Dobutsu,

 

If you want to create 2 docx files out of the separated arrays, I afraid that there is no any way to acheive your needs.

 

You could take a try to create 2 excel files out of the separated arrays, and the screenshot of the flow should as below:

 

Capture.PNG

 

You could use two Filter Array actions to get the two separate arrays.

 

Best regards,

Alice

Charles_John Advocate II
Advocate II

Re: Filter array into two separate arrays

@Dobutsu,

I don't understand the structure of your data, and why a condition nor a filter won't work.

 

I would suggest an iterative approach so that you can split out your data and emails by any number of product categories and not just two. If it is always true that the data is one or the other, I would suggest solving the binary condition of the form side and not in Flow. Build two separate forms or have a distinguishing question to trigger off of.

 

To solve for any number of product category conditions, say your data ultimately looks something like this:

Name | Email | Product | Product Category | Attribute 1 | Attribute 2 | ... etc

 

1. Add an Action to get all rows of your data

2. Add an Action to get distinct rows of your data

 

3. Add an Apply to Each loop

  • and for each distinct product category, compose a document using all rows of data that match the current distinct value
    • I would use v-yuazh-msft suggestion and build a .CSV document 
  • Add to email and send
Dobutsu
New Member

Re: Filter array into two separate arrays

Alice!

Thank you for answer, but how do you split actions into two? Before the arrays

Community Support
Community Support

Re: Filter array into two separate arrays

Hi @Dobutsu,

 

You could add a parallel branch:

Capture.PNG  

 

 

Best regards,

Alice

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,477)