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

Help with flow unique value and filter


Hi, I need help with a flow. I have an entity called AUDICAT with a field called PLATE and another called FORMATION. The entity has more than 20,000 rows. The flow I need is to send an email with a csv file attached with the unique values ​​of the PLATE column and that in the FORMATION column it has an "YES". Thank you very much for the help

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

So the 2000 limit exists in PowerApps but you can try doing this, in the action of List records, can you add 10000 to the top count value and check if that resolves your issue? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

23 REPLIES 23
Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

Please see the screenshot below: I1.PNG

 

i2.PNG

Here, i am using the CDS connector to get the records and using the filter query to filter the results accordingly. You need to get the logical name of the PLATE and the FORMATION fields and replace that up in the filter query. Note that if the FORMATION field is of type two options or option set, you need to find the value of the YES label (usually 0) and then update the expression as eq 0 instead of eq YES. 

 

Next use the create a CSV action to create the CSV table and use the custom headers option to get only the values you need in the table and use that in the email attachment. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

Thank you very much for your help, I created the flow and it works but I only receive the empty csv file, with the column headings but without any data. Do you know what I am doing wrong?

 

Thanks and best regardsImagen sin título.png

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

Can you please post the expanded screenshot of the Create Table CSV action?

 

From the run history, can you check if there are records being returned in the Dynamics get records action? 

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

If there are records. If I change the expression "uniquevalue" to a plate if I obtain a csv file with the dataImagen sin título.png

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

The CSV action is fine. When you run the flow, please check the flow run outputs in the Dyanmics action. Can you see any records over there? You can also expand the CSV table action in the run outputs to check what data has been populalted in the table. That way, we can know if the ODATA filter query has worked fine. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

There is no record. but 700 should appear, which are what I get if I open the entity in excel and the filterImagen sin título.png

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

the 'uniquevalue' in the ODATA flter is what i put just for a sample. Here you will have to put the actual unique value that you are looking for. Can you try updating that filter query? 

 

Also, can you share what is the dataype of these fields that you want to apply the filters on?

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

Now I understand. but what I want to obtain is a csv with the values ​​only once, although in the data source they are repeated many timesImagen sin título.png

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

Looks like you have duplicate records in the data source. In that case, you will have to first get rid of the duplicate records and then create the CSV table flow. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

I cannot delete duplicate records from the data source since they contain other much information that I need. What I need is to extract the information without the duplicates but without deleting them.

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

You can refer to the screenshots belwo for doing that:ss1.PNG

 

ss2.PNG

 

ss3.PNG

I am using two arrays to get the unique values and create the CSV table from the filtered values from Dynamics. Carefully note the two variables and replicate the flow accordingly. While creating the CSV table, you will have to use custom headers and the value of the particular element can be obtained by using the expression: 

item()?['_statecode_label']

'_statecode_label' is the logical name of the field for which the value needs to be mapped. you need update that accordingly in the CSV table action. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

creating the csv table does not give me the option of "real". and the "Name" field of dynamics which is? plate ?. and in the list enumeration filter do I have to put something? formation eq yes?

 

sorry

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

@antonio_piernav 

 

For the List records action you need to add the filter query to get the particular values. You mentioned in your previous responses that you were able to get those in the CSV file. 

 

In my flow I am checking the duplicate records with the 'Name' field, similarly you can replicate that with the field that you want to check the duplicate record on, 

 

In the CSV action, you will have to add the logical names of the fields and you can get those from the previous run history under the list records action. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

ok. but when creating the csv table it doesn't give me the option to choose "real"

 

Imagen sin título.png

just value and ask in powerapps

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

Yes. As we are populating the variable and getting the filtered values in that variable, we will have to access individual elements by using the expression items()?[''] and within the '' you need to enter the logical name of the field that you want to get the data of. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

Thanks for the help, it works but it gives me duplicate values ​​in the "Matricula" field, no unique values

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

@antonio_piernav 

 

So you will be able to map the records with only one unique value. that is in the append to array variable 1 action where you are appending just one value and checking if the duplicate exists on that. 

antonio_piernav
Level: Powered On

Re: Help with flow unique value and filter

If I understand it, but it doesn't work, I'm sorry

Dual Super User
Dual Super User

Re: Help with flow unique value and filter

Hi @antonio_piernav 

 

No Problem! What issue are you facing? I can try giving some brief explanations. 

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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
Top Kudoed Authors
Users online (6,900)