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 / Changing the value of ...
Power Apps
Answered

Changing the value of a Dropdown box based on a selected value in another dropdown value

(0) ShareShare
ReportReport
Posted on by 35

Hi Experts,

 

I have a sharepoint form with two dropdown combo boxes. 

I would like to achieve the following.

If a user selects a particular value in DropdownA I would like DropdownB to be set to a specific value and disabled.

 

Disabling Dropdown B is a synch. 

Dropdown B’s DisplayMode: If(DropdownA.Selected.Value = “particular value”, Disabled, Edit)

 

But getting the value to set in DropdownB is proving to be a challenge.

What I’ve tried:

 

1. Setting a variable

DropDownA OnSelect event: If(DropdownA.Selected.Value = “particular value”, UpdateContext({varXX:true}), UpdateContext({varXX:false}))

DropDownB Default: If(varXX, Lookup(Choices(‘Share Point List’, ‘List Column’), value=“specific value”), Parent.Default))

 

2. Setting the Default depending on DropDownA’s selected value

DropDownB Default: If(DropDownA.Selected.Value = “particular value”, Lookup(Choices(‘Sharepoint List’, ‘list column’), value=“specific value”, Parent.Default)) 

And

DropDownB Default: If(DropDownA.Selected.Value = “particular value”, “specific value”, Parent.Default)) —> This does not work as it is expecting an object but gets text instead.

 

Looking to you for advise on how to achieve the desired outcome. This to me should be pretty simply, but I’ve been banging my head trying to figure it out.

 

Categories:
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Gunsmoke125 ,

     

    Two things to confirm:

    1. What are the types of two columns?  Could you please share the Items property of two dropdown?

    2. Do you use Drop Down or Combo box? 

     

    If the column is choices type and you use the dropdown, set Default of DropDownB:

     

    If(DropdownA.Selected.Value="particular value",LookUp(Choices('Sharepoint List'. 'Choices Column'),Value="specific value").Value)

     

    Note: Parent.Default is not fit for dropdown.

    If the column is choices type and you use the combo box, set DefaultSelectedItems of DropDownB:

     

    If(DropdownA.Selected.Value="particular value",LookUp(Choices('Sharepoint List'. 'Choices Column'),Value="specific value"), Parent.Default)

     

    Annotation 2019-11-20 170042.png

    At last, I recommend to use combo box.

    Best regards,

    Sik 

  • Gunsmoke125 Profile Picture
    35 on at

    @v-siky-msft thank you. Yes you correctly identified that the form is using Combo Box and your suggestion to put the code into the DefaultSelectedItems property was the thing that clinched my problem.

     

    Thanks for taking the time to respond with such a detailed and useful explanation. Greatly appreciated.

     

    Kindest Regards

     

    DJ

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

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard