cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Achavan
Resolver II
Resolver II

Need Unique array from List Records

From the Invoice entity we need unique array of customers,

we tried using variables and union for the same.

However we are not able to get the array with only Guids.

 

We tried splits function as well

Requirements : get array of unique customers from List of invoices.

1 ACCEPTED SOLUTION

Accepted Solutions
Naveen_772
Resolver II
Resolver II

Hey @Achavan

 

I tried to solve your problem by implementing the same scenario using the Account and Contact entity.

 

Account-->Invoice

Contact-->Customer

 

After you list all the invoice records using the List Record action, Use the "Apply to each" action to loop all the records. Try to get the guid of every customer and add it to the array variable.

 

After the for-each loop usea compose action to get the unique value by below exp.

 

Expression:-

union(variables('Array'),variables('Array'))

 

 

Screenshot of the flow:-

 

acc.PNG

 For getting the Guid I used following Expression:

item()?['_primarycontactid_value']

 

 

I hope I am able to help you to solve the issue. Let me know if I can further help you out.

 

Accept this as a solution if you think the above content fulfills your request.

 

Thank You 

Naveen Gupta

View solution in original post

5 REPLIES 5
efialttes
Super User
Super User

Hi!

Is 'List of invoices' a sharepoint list? An excel table?

If SP, which column type do you want to consolidate their current values? Is it 'single line of text', choice, lookup...?

 

In case of excel, here you are an example of how to implement it

https://powerusers.microsoft.com/t5/Building-Flows/Consolidated-email-based-on-date-in-excel/m-p/471...

Thanx



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi, 

we want unique array of Customers from list records (cds connector) 

 
 
Naveen_772
Resolver II
Resolver II

Hey @Achavan

 

I tried to solve your problem by implementing the same scenario using the Account and Contact entity.

 

Account-->Invoice

Contact-->Customer

 

After you list all the invoice records using the List Record action, Use the "Apply to each" action to loop all the records. Try to get the guid of every customer and add it to the array variable.

 

After the for-each loop usea compose action to get the unique value by below exp.

 

Expression:-

union(variables('Array'),variables('Array'))

 

 

Screenshot of the flow:-

 

acc.PNG

 For getting the Guid I used following Expression:

item()?['_primarycontactid_value']

 

 

I hope I am able to help you to solve the issue. Let me know if I can further help you out.

 

Accept this as a solution if you think the above content fulfills your request.

 

Thank You 

Naveen Gupta

Thank you @Naveen_772 

 

can you help me to create two dimentional array of Account and Contact from Opportunity

Hey @Achavan 

 

I am happy to help.

 

Thank You

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,552)