cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Finding a specific record and doing something

So I have this Table with a lot of records, and I want to find one (or more) with one specific value for a specific column, and if it exists then I want o do something. I noticed Filter, Search and LookUp don't work because they return a table and I can't do anything with it, what can I do?

2 REPLIES 2
timl
Super User
Super User

Hi @Anonymous 

You might want to consider the use of the CountIf function.

Here's an example of the syntax you would use.

If( CountIf(UserTable, EmailAddress="tim@tim.com" ) = 0,
Navigate(NewScreen),
Navigate(EditScreen)
)

In this example, if a row doesn't exist in the UserTable with the EmailAddress  tim@tim.com, this formula navigates to a screen called NewScreen.

v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Could you decribe more clearly about your demands?

If you need a table, I suggest you use this formula: Filter(tablename,formula) 

If you need a record, Isuggest you use this formula: LookUp(tablename, formula)

If you need a value, I suggest you use this formula: LookUp(tablename,formula,fieldname)

These formulas' result is different. You need to choose according to your demands.

Here's a doc about these fucntions for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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