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

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 Team
Community Support Team

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
Level: Powered On

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
Level: Powered On

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 Team
Community Support Team

Re: Filter array into two separate arrays

Hi @Dobutsu,

 

You could add a parallel branch:

Capture.PNG  

 

 

Best regards,

Alice

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 (Last 30 Days)
Users online (4,971)