/

Search Contacts by Name, Email, and Account in Power Apps: Series 5

Dataverse Accounts gallery screenshot

Sales users often search for a person using a name or email address, then confirm the associated company. This part adds a practical search experience to the Contacts screen.

1. Add a search input

Add a text input named txtContactSearch and a gallery named galContacts. Show Full Name, Job Title, Email, and Parent Customer where available.

2. Search by name

SortByColumns(
    Filter(
        Contacts,
        StartsWith('Full Name', txtContactSearch.Text)
    ),
    "fullname",
    SortOrder.Ascending
)

Column display names and sort identifiers can differ in the generated app schema. If you need to search email too, add a second StartsWith condition after checking that the combined expression is delegable for Dataverse.

3. Scope search to a selected Account

If the seller has selected an Account, add a parent-customer lookup condition. Compare the lookup record with the selected Account record, not with its name string. The precise expression depends on the polymorphic lookup metadata in the environment.

4. Avoid non-delegable workarounds

  • Review delegation warnings in the formula bar.
  • Test with more rows than the configured data row limit.
  • Do not collect the entire Contacts table locally to search it.
  • Use Monitor to inspect the Dataverse query and response time.

For advanced search across many fields, consider Dataverse search or a server-side search endpoint rather than a client-side formula that silently returns partial results.