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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multi level Dropdown n...
Power Apps
Answered

Multi level Dropdown not working of second page

(0) ShareShare
ReportReport
Posted on by 13

Hi all,

 

i have created a powerapp from a sharpoint list. for this list i have created a multi dropdown.
when i select a country in the first dropdown (ddCountry) the second dropdown (ddPort) shows only the ports applicable for that country.

Jaaco_0-1625968725574.png

my code in the items property of the combobox Port is:

Distinct(Filter(Port_1; Country2 = ddCountry.Selected.Result);Port)

On this form it's all working fine

 

i have created excactly the same on a other form but there it's giving the error that "result" is invalid

Distinct(Filter(Port_1; Country2 = ddCountryLL.Selected.Result);Port) 

 

please help me out

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

    Hi @Jaaco ,

    What is the Items of ddCountryLL?

     

  • Jaaco Profile Picture
    13 on at

    hi Warren

    For ddCountry items is:

    Sort(Distinct(Port_1; Country2);Result;Ascending)

     

    For ddCountryLL items is:

    Sort(Distinct(Port_1; Country2);Result;Ascending)

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Thanks @Jaaco ,

    I was hoping for something obvious, but this is not so.

    If you have a drop-down with the Items

    Sort(
     Distinct(
     Port_1; 
     Country2
     );
     Result
    )

    and there is a Text (Single Line of) called Country2 in the List Port_1, then it will display a unique set of the values in the Country2 field (please confirm you can see these in the drop-down). 

    If you then have a second drop-down ddCountryLL with the Items

    Distinct(
     Filter(
     Port_1; 
     Country2 = ddCountryLL.Selected.Result
     );
     Port
    ) 

    and there is also a Text (as above) field called Port in the List Port_1, then it will produce a unique set of values in a field called Result for the Port field where the Country2 field matches what is selected in the first drop-down (so there is nothing wrong with your code). You might however try this

    Sort(
     Distinct(
     Filter(
     Port_1; 
     Country2 = ddCountryLL.Selected.Result
     );
     Port
     );
     Result
    ).Result 

    I have tested it here using your code structure and received the expected output.

     

    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.

     

  • Jaaco Profile Picture
    13 on at

    Hi Warren,

     

    i have 2 forms with exact the same dropdowns only the name of the dropdowns are different

    page 1 ddCountry linked to ddPort (here it works)

    Jaaco_0-1626053572345.png

    Jaaco_3-1626054020695.png

     

    Page 2 ddCountryLL and ddPortLL (here it doesn't work)

    Jaaco_1-1626053645406.png

    Jaaco_4-1626054078181.png

     

     

     

     

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @Jaaco ,

    I saw all of that in your original post - the point is with what you have posted, there is no reason it should not work.

    The error seems to be that the Items of ddCountryLL are NOT a Distinct filter (or .Result would be correct)

    If you put a label on the screen and type in ddCountryLL.Selected.  (note second dot), what valid values come up underneath? The code you have posted for the Items of ddCountryLL

    Sort(
     Distinct(
     Port_1; 
     Country2
     );
     Result;
     Ascending
    )

    has to produce a valid output of ddCountryLL.Selected.Result (apart from the Distinct filter, the sort on Result is valid). There is something missing in all of this - please re-check the code you have posted (and supply the output on the label)

     

    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.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Jaaco ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • Verified answer
    Jaaco Profile Picture
    13 on at

    Hi @WarrenBelz ,

    accidently i found what caused the error. the names of my fields where almost identical and apperently the whole name of the field is not read in the process. after changing the name of the field it worked.

    so not ddcountryLL and ddcountry but ddLLcountry

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard