cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

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.

Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,703)