cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonasH
Helper II
Helper II

Check if record exist

Hey,

I want to check if a record exists in a collection or in an sql db.


2019-10-07 15_21_17-ONCR - PowerApps.pngI tried to use statements like "lookup" and "filter" but they should work with gallerys only.

 

I could imagine something similar like === in php.

 

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions

Hey @JonasH 

 

You can use CountRows() function to check the number of records related to specific criteria.
 
A dummy expression:
 
If(CountRows(Filter(DataSource,Name = "Value1")) > 0,"Exist","Does Not Exist")
 
If you can share more details about the scenario that you are trying to implement, we might be able to help you better.
 
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

3 REPLIES 3

Hey @JonasH 

 

You can use CountRows() function to check the number of records related to specific criteria.
 
A dummy expression:
 
If(CountRows(Filter(DataSource,Name = "Value1")) > 0,"Exist","Does Not Exist")
 
If you can share more details about the scenario that you are trying to implement, we might be able to help you better.
 
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!

Hey @yashag2255 ,

thanks for your fast reply.

Every record has a unique GUID. The Information, which should be added to the table, should be assigned to the record with the same id.

So I just need a possibility to check if a id is in a table or not.

 

I think, that you solution may work. I definitive will try the statement you suggested.

 

Thanks for your help.

Hey @yashag2255 ,

Good news!

You solution seems to work fine.

 

Thank you very much

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (2,573)