Skip to main content

How to Find a Record in Power Apps with LookUp

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

Filter gives you every matching row; LookUp gives you the first one. Use it when you need one record, or one value from it: the job title of a competency, a person's response to a question, the item with a given ID.

Syntax​

Syntax
LookUp( Table, Formula [, ReductionFormula ] )

LookUp checks each record against Formula and returns the first one where it's true. With ReductionFormula, it returns that value from the record instead of the whole record. If nothing matches, it returns blank (Filter, Search, and LookUp functions).

Prerequisites​

  • A table or list to search. The examples use the RoleCompetencies SharePoint list of the Career Development Plan app (Part 2).

Example 1: A Value From the First Match​

Which job title has the competency Coaching? Shown in a label, with .JobTitle to read one column of the record:

Label → Text
LookUp(RoleCompetencies, Competency = "Coaching").JobTitle

The preview strip under the formula bar shows Sales Manager:

The formula bar with LookUp(RoleCompetencies, Competency = "Coaching").JobTitle, the preview strip reading Sales Manager with Data type text, and the header label on the canvas showing Sales Manager

The same with the third argument: LookUp(RoleCompetencies, Competency = "Coaching", JobTitle).

Example 2: No Match​

The list has no Negotiation competency:

Label → Text
LookUp(RoleCompetencies, Competency = "Negotiation").JobTitle

The formula bar with the LookUp for Negotiation and the preview strip reading Blank with Data type text, and an empty header label

The result is Blank, not an error. Plan for it: Coalesce gives a fallback, and Switch can treat blank as its default case.

Example 3: Several Conditions​

In the app's My Plan screen, each competency needs the person's response to it, if there is one. The response must match both the competency's ID and its level:

Part of galMyPlanMPS → Items
LookUp(
locMyResponses,
RoleCompetencyId = planItem.ID && Level = planItem.Level.Value
).Status.Value

&& requires both conditions (How to Combine Conditions in Power Apps with And and Or). planItem is the competency being processed, named with As. This LookUp searches a table already loaded into a variable, so it doesn't go back to SharePoint for each row.

Delegation​

On a SharePoint list, Microsoft lists LookUp as delegable for number, text, Yes/No and date columns, so SharePoint does the search (SharePoint delegation). The same limits apply to the condition as for Filter; see What Is Delegation in Power Apps?

Common Mistakes​

MistakeWhat happensDo this instead
Expecting all matchesOnly the first comes backUse Filter
Not planning for no matchA blank shows up as nothing, or breaks text that uses itHandle blank with Coalesce, If or a default
A LookUp on a data source in every gallery rowOne query per rowLoad the rows once, then LookUp the loaded table

Troubleshooting​

SymptomLikely causeFix
The result is BlankNothing matchedCheck the condition's values in the preview strip
A delegation warningThe condition can't be sent to the data sourceRewrite it with delegable comparisons

FAQ​

LookUp or Filter?​

LookUp for one record, Filter for all matching records. First(Filter(...)) gives the same as LookUp, but less clearly.

Can I return more than one column?​

Return the whole record (no third argument), store it if needed, and read its columns.

Conclusion​

LookUp(table, condition) returns the first matching record, and .Column or a third argument gives one value from it. Expect blank when nothing matches.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.