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
Advocate III
Advocate III

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
Advocate III
Advocate III

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,779)