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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Drop down of choices b...
Power Apps
Answered

Drop down of choices based on another drop down of choices in the same SP List

(0) ShareShare
ReportReport
Posted on by 51

Hi, I have two drop downs and they both have choices as its column type from the same Sharepoint list. Is it possible to have the choices of the 2nd drop down list based on the 1st drop down list aside from making a new sharepoint list just to show the relationships? For the existing drop down, I currently have the following as the code under the Items Property: Drop down 1: Choices('Sharepoint List Test'.'Column A') Drop down 2: Choices('Sharepoint List Test'.'Column B') Thank you!

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,757 Most Valuable Professional on at

    Hi @kdc02 ,

    The issue here is how do you define the relationship between the various choice values ? You really need a reference list with the combinations of ColumnA to ColumnB (which is not what you want to do).

     

  • kdc02 Profile Picture
    51 on at

    Hi @WarrenBelz 

    Does creating a new sharepoint list specifically for the relationships work even if they are choices in my main sharepoint list? Also, is the "lookup" column type in sharepoint list the way to define relationships in sharepoint list?

     

    Thanks

  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @kdc02,

     

    If you still wish to not create a relationship between the two choices, you would have to hard code the Items property of your dropdown. This is an example of what it would look like.

     

    If(DataCardValue2.Selected.Value = "Red", ["Apples","Strawberries","Watermelon"],
     DataCardValue2.Selected.Value = "Green", ["Grapes","Pear"],
     DataCardValue2.Selected.Value = "Orange/Yellow", ["Oranges","Mango","Rockmelon"]
    )

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • Verified answer
    WarrenBelz Profile Picture
    154,757 Most Valuable Professional on at

    Hi @kdc02 ,

    The whole issue is that there is no relationship defined between two lists of free-text choices, so how after choosing from the first one, do you determine which ones from the second list belong to it ? I use reference lists all the time - for instance you will have duplicates of field1 as many field2 items belong to it, so the Items of the first drop-down would be

    Sort(
     Distinct(
     YourRefList,
     field1
     ),
     Value
    )

    and the Items of the second drop-down

    Sort(
     Filter(
     YourRefList,
     field1 = dropdown1.Selected.Value
     ),
     field2
    ).field2

    I would recommend you turn the choices columns in your main list back to Text and simply write the drop-down values back to these3 fields. Choice columns also have restrictions - (the main one) you cannot sort by them in a Delegable manner nor can you use StartsWith() in a filter.

    Lookup columns serve little purpose and sometimes restrictions/complexity you can do without - I never use them. SahrePoint is not a relational database and will not accept delegation on queries involving relationships at a database level.

     

    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 the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • kdc02 Profile Picture
    51 on at

    Hi @WarrenBelz 

    I tried making a reference list and it worked. Although when I try to patch the values, I get the error "Expecting a record value but of a different schema". My code for the patch are as follows:

     

    Patch('Test', 
    Defaults('Test'),
    {
    'Field A':Dropdown_A.Selected,
    Field B:Dropdown_B.Selected}
    );

     

    Thanks

  • WarrenBelz Profile Picture
    154,757 Most Valuable Professional on at

    @kdc02 ,

    As below - if you are writing to Text fields

    {
     'Field A': Dropdown_A.Selected.Value,
     'Field B': Dropdown_B.Selected.'Field B'
    }

    If you have left them at Choice fields

    {
     'Field A': {Value: Dropdown_A.Selected.Value},
     'Field B': {Value: Dropdown_B.Selected.'Field B'}
    }

     

    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 the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard