Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

How to filter a lookup field by another lookup field

(1) ShareShare
ReportReport
Posted on by 49

I have a power app form that there are 2 lookup fields

First one is about the machine model looking up the list below
ID Title
1  Model A

2  Model B

3  Model C

 

second one is about the option looking up the list below

ID Title
1  Option A

2  Option B

3  Option C

4  Option D

Model A can choose Option A and Option B only
Model B can choose Option B and Option D only
Model C can choose Option A, Option B and Option C only

How should I design the lookup list for Machine Model and Option? How to set the filter of lookup field in the power app form?

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: How to filter a lookup field by another lookup field

    For your first design, could you use something like this? 

    First(DataCardValue2.SelectedItems).Option
  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: How to filter a lookup field by another lookup field

    Okay so 2 things: 

    First: it's best not to use actual LookUp columns in Sharepoint Lists for Power apps.  Those columns are still quite buggy and not easy too  use. You can simulate the lookUp in Power apps without any problem. If you have the possibility to change that it would make your task much easier. 

     

    Second: Are you using a combobox? If so do you need to be able to select several models at once? 

     

  • AdrianChang Profile Picture
    49 on at
    Re: How to filter a lookup field by another lookup field

    I think I need to use my design, because I need all same option using the same ID. Option A in ID: 1, Option B in ID: 2, etc.
    Do you have any suggestion how can I set filter in form for my design? I hope to use my first or second design.

     
  • AdrianChang Profile Picture
    49 on at
    Re: How to filter a lookup field by another lookup field

    Seems not work
    AdrianChang_0-1720590876320.png

    AdrianChang_1-1720590908068.pngAdrianChang_2-1720590929830.png

    AdrianChang_3-1720591019593.png

     

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: How to filter a lookup field by another lookup field

    My suggestion is to create just the one table I showed you. and use a filter in the Items property of your Dropdown.

     

  • AdrianChang Profile Picture
    49 on at
    Re: How to filter a lookup field by another lookup field

    @DBO_DV Your suggestion is same as my third design? 3 tables in total?

  • AdrianChang Profile Picture
    49 on at
    Re: How to filter a lookup field by another lookup field

    I think of 3 Designs
    First:
    Machine Model List

    IDTitleAvailable Model
    (Lookup to Option List)
    1Model A[Option A, Option B]
    2Model B[Option B, Option D]
    3Model C[Option A, Option B. Option C]

    Option List

    IDTitle
    1Option A
    2Option B
    3Option C
    4Option D

     

    Second:

    Machine Model List

    IDTitle
    1Model A
    2Model B
    3Model C

    Option List

    IDTitleAvailable Model
    (lookup to Machine Model List)
    1Option A[Model A, Model C]
    2Option B[Model A, Model B, Model C]
    3Option C[Model C]
    4Option D[Model D]


    Third:

    Machine Model List

    IDTitle
    1Model A
    2Model B
    3Model C

    Option List

    IDTitleAvailable Model
    (lookup to Machine Model List)
    1Option A[Model A, Model C]
    2Option B[Model A, Model B, Model C]
    3Option C[Model C]
    4Option D[Model D]

    Mapping Table

    IDModelOption
    1Model AOption A
    2Model AOption B
    3Model BOption B
    4Model COption A
    5Model COption B
    6Model COption C
    7Model DOption D


    However, I don't know how to set the filter in power app form.
    And I would like to use first or second design

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: How to filter a lookup field by another lookup field

    Hey @AdrianChang ,

     

    The simplest way would be to create the table like this: 

    ModelOption
    Model A

    Option A

    Model AOption B
    Model BOption B
    Model BOption D
    Model COption A
    Model COption B
    Model COption C

     

    Then you could use this function: 

    //in Second Dropdown
    Filter(ListName,Model=Dropdown1.Selected.Model)

     

    Let me know if it helped you or if you need any further assistance.

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard