web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : D9q6vVJV3SJI5pIGsumJpJ
Power Apps - Building Power Apps
Answered

Filter a lookup field in a canvas app

Like (0) ShareShare
ReportReport
Posted on 18 Jun 2024 22:32:05 by 149

Hi All,

 

I have a canvas app with a connection to two simple tables

 

Table 1: Enquiries

Table 2: Clients

The form is connected to the new enquiry table which has three columns:

Title: Single line of text
Client: Lookup to client table

Scope: Rich Text

 

When i created the form and connected the enquiry table data, power apps generated the form as expected.

So when i click into the 'Client' data card to choose the client i have a big long list of all my clients. how can i filter this list? in the actual client table theres a Boolean column, 'Active/Archived'. how can i get the Client data card to only show me the active clients.

 

Thanks,

Dan

Categories:
  • Verified answer
    danny90 Profile Picture
    149 on 19 Jun 2024 at 13:49:58
    Re: Filter a lookup field in a canvas app

    Hi @happyume 

     

    I figured it and it was so simple 🤣

    Filter(Choices([@Enquiries].op_ClientCompany),'Is Customer')
     
    and that was literally it! - wasted nearly a day at that haha.
     
    Thanks,
    Dan
  • danny90 Profile Picture
    149 on 19 Jun 2024 at 13:17:54
    Re: Filter a lookup field in a canvas app

    hi @happyume 

     

    That didn't work I'm afraid. im having a really hard time trying to figure this one out. 

     

    because the client column is a yes/no field (yes=1 no=0) i have tried all combinations to get this to work but it either throws an error because if the operator = or whenever i try .value =1, = true = yes ="yes"

    you name it ive tried it.

    the only expression I've manage to write that doesn't throw an error is as follows but it doesn't filter the data, the list in the combo box is still returning everything in the table.
    Filter('XeroAPI GET Contacts', 'Is Customer (XeroAPI GET Contacts)'.Yes)

    Ive even tried pulling the data into a collection using the formula above but when i run the onStart, nothing happens, no collection is  created.

    its driving me up the wall now 😂

    Thanks,

    Dan

  • Mitanshu Profile Picture
    1,635 Moderator on 19 Jun 2024 at 03:00:37
    Re: Filter a lookup field in a canvas app

    Assumptions:
    a - Your Datacard is DropDown control
    b - Your column for Active/Archived status is called ActiveArchived

    You can solve as below:

    1 - Unlock the Client Data Card by clicking on the padlock icon in the Advanced pane on the right side
    2 - For the Items property as:

     

    Filter(Clients, 'ActiveArchived' = true)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2