cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
antonio_piernav
Helper III
Helper III

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

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

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!

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

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? 

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

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!

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

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?

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

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!

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.

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!

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

@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!

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

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!

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

@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. 

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

Hi @antonio_piernav 

 

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

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,753)