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 / PowerApps Form have fi...
Power Apps
Answered

PowerApps Form have field dynamically populate with SharePoint list item

(0) ShareShare
ReportReport
Posted on by

Hi there,

 

I have a PowerApps form linked to a SharePoint List. I have a Yes/No field (DataCardValue3) and if this is changed to 'YES' I want a choice field (DataCardValue26) to populate with a specific option. Ideally non-editable. 

 

So I guess along these lines : If(DataCardValue3=true,"No Error",else blank) <<where the 'else blank' is just ready for the user to select whichever choice they want, if the Yes/No is not changed to 'YES'.

 

Any ideas?

 

Jemma

Categories:
  • tly Profile Picture
    400 on at

    There are probably many ways you can do this, but in line with what you are suggesting, you can do the following; on your screen's OnVisible Event property, create a collection with the values you want to have:

    ClearCollect(myCollectionXYZ,
     Table(
     {FilterValue: true, Display: "No Error", Order: 1},
     {FilterValue: true, Display: Blank(), Order: 0},
     {FilterValue: false, Display: Blank(), Order: 0}
     )
    )

    This will create a collection table that looks like this:

    FilterValue | Display | CustomSortOrder
    true | No Error | 1
    true | Blank() | 0
    false | Blank() | 0

    In the (presumed) combobox DataCardValue26, change its "Item" property to:

    SortByColumn( 
     Filter(myCollectionXYZ, FilterValue=DataCardValue3.Value),
     CustomSortOrder, Ascecnding
    )

    Be sure that in DataCardValue26's Advanced Properties tab, you change the DisplayFields to ["Display"] to reflect the column name in the collection. And then you have to update DataCard26's Update property. The value in this property will get plugged into its assigned SharePoint column-cell. So if you want the selected item from DataCardValue26, you will have to update the Update property to (without quotes) "DataCardValue26.Selected.Display". So now, whatever is selected, the Display column of the myCollectionXYZ collection will be submitted.

     

    The names I have chosen are for example-sake; you can change the column names to however you'd like.

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

    Hi @heytherejem,

    Do you want to set a default value for the Choice type column based on the Yes/No field within your Edit form?

    Further, could you please share a screenshot about your app's configuration?

    I have made a test on my side, please take a try with the following workaround:8.JPG

     

    9.JPG

    Set the OnCheck property of the Toggle control (on your side, it is DataCardValue3) to following:

    Set(IsChecked,true)

    Set the OnUnCheck property of the Toggle control to following:

    Set(IsChecked,false)

    Set the DisplayMode proeprty of the Combo box control (on your side, it is DataCardValue26) to following:

    If(IsChecked,DisplayMode.Disabled,DisplayMode.Edit)

    Set the DefaultSelectedItems property of the Combo box control to following:

    If(
     DataCardValue3.Value=true,
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: "No Department"
     },
     Parent.Default
    )

    On your side, you should type the following formula within the DefaultSelectedItems property of the Combo box control:

    If(
     DataCardValue3.Value=true,
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: "No Error"
     },
     Parent.Default
    )

    The GIF screenshot as below:Test1.gif

     

     

     

    Best regards,

    Kris

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard