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 / Cascading Dropdowns sh...
Power Apps
Answered

Cascading Dropdowns showing record from the sharepoint list

(0) ShareShare
ReportReport
Posted on by 6

Hi all, I am building a questionnaire with power apps, while on the landing page there is a gallery leading to all existing questionnaires & a button leading to a new questionnaire. In the questionnaire, besides the form, I've created several cascading dropdowns, and the dropdown's item property are:
1. Distinct(' sharepoint list', 'sharepoint column'), and the following one

2. If(dropdown1.Selected.Result= "a", ["c", "d"] , dropdown1.Selected.Result= "b",["e","f"]) 

 

and for the submit button, to make sure the value returns to the same sharepoint list and the same record for both form & dropdowns, the onselect property for the button is

SubmitForm(Form1); Patch( 'Sharepoint list name', Gallery1. Selected, {'column for dropdown value 1: Dropdown 1. Selected.Result, 'column for dropdown value 2: Dropdown 2. Selected.Value})

 

So far everything went well and I have no problems submitting the questionnaire & have everything on my sharepoint list. However, when i want to revisit the existing questionnaire via gallery, dropdowns will show no record. (data in forms are fine and shown properly because the item property for forms is set to "Gallery1. Selected")

Therefore,my main question will be, how can I see the pre-filled-in data in the dropdown lists after clicking on the gallery?
Thanks a lot in advance!

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Ting1 

    Make sure that the icon in the gallery includes EditForm(Form1) as well as the Navigation() function to open the screen that contains it.  Make sure that your edit form has the Item property set to Gallery1.Selected or in the event that the DataSource for the gallery ('Sharepoint list name') has been modified with AddColumns(), ShowColumns(), etc. or is a collection, you will need to be more specific and the Item property may be Lookup( 'Sharepoint list name', ID = Gallery1.Selected.ID).  The dropdown controls in the edit form card should have the Default property as Parent.Default.  

  • Ting1 Profile Picture
    6 on at

    Hi @Drrickryp ,
    Yes I have the icon set up and form has the Item property set to Gallery1.Selected.
    However, my form and my cascading dropdowns are two 
    separate things (the dropdown doesn't belong to the edit form), since I created the cascading dropdowns by simply insert the dropdown in power apps. And I patch the dropdown value to the same sharepoint list (which is also the datasource of the form) by using the patch function. 

    So since my dropdowns aren't linked to a  datasource, when I click on the gallery only the form will show the records, but the dropdown list still remain empty. 

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Ting1 ,

    Do you want these two Cascading Dropdowns  show default value in edit form?

    If so, you need to set the drop downs' Default to the value that is related to the form's Item.

    Try this:

    1.drop down1's Items:

    Distinct(' sharepoint list', 'sharepoint column')

    drop down1's Default:

    Gallery1. Selected.'column for dropdown value 1

    2.drop down2's Items:

     

    If(dropdown1.Selected.Result= "a", ["c", "d"] , dropdown1.Selected.Result= "b",["e","f"]) 

     

    drop down2's Default:

    Gallery1. Selected.'column for dropdown value 2

     

     

    Best regards,

  • Ting1 Profile Picture
    6 on at

    Hi @v-yutliu-msft 
    Yes thank you so much!!!
    That was exactly what I was looking for, really appreciate your help!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard