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 in ...
Power Apps
Unanswered

Changing the value in choice dropdown in a control when toggle control switched.

(0) ShareShare
ReportReport
Posted on by 59

Hi

Any advise appreciated My scenario When the Manager completed (DataCardValue41) field is toggle to on (true) then change the dropdown value of ef3 Status value (datacardvalue42) to manager

 

I Assume on the datacardvalue41  oncheck is where I put the if statement, but its updating the ef3 status that I still have to get my head around 

 

Capture.PNG

Capture.PNG
Categories:
I have the same question (0)
  • TimRohr Profile Picture
    669 on at

    Hi, @sbonera ...

    Put your statement in the DataCardValue42 DefaultSelectedItems statement...

     

    If(DataCardValue41.Value, First(Filter(your_ef3_DataSource, yourDisplayField = "Manager")))

     

    Your syntax might change slightly if you're working with SharePoint lists... but the above will put "Manager" into the control when you toggle the control. If the control is toggled to "OFF", the field will clear because there is no ELSE case provided. You can use that portion of the statement if you need to extend this functionality.

  • sboneratm Profile Picture
    59 on at

    Thanks that makes sense, the dropdown control is indeed a sharepoint choices field, there is no defaultselecteditems for that such control?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @sbonera 

     

    You can put the Default property of your Dropdown on

    Dropdown2Default

    and then put your OnCheck property to :

    UpdateContext({Dropdown2Default:"MANAGER"});;
    Reset(Dropdown)

    Hope that will help you 🙂

     

    Best regards

     

    Louis

  • TimRohr Profile Picture
    669 on at

    The property is there regardless of your datasource. You can find it in the upper left list of all properties, or if you go to the Advanced pane (on the right), find the "DATA" section of properties, and then click on the "More Options" button.

     

    To be fair, @Anonymous 's suggestion of using a context variable is an absolutely viable way to accomplish the same effect... and one that I use probably 3 out of 4 times when this sort of thing comes up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @TimRohr ,

     

    When I posted the reply, I didn't see there were already replies.

    I didn't think about that... It's a good way too (I found the simpliest soluce eheh...)

    I'll try it

     

    Regards

     

    Louis

  • sboneratm Profile Picture
    59 on at

    thanks both 

    @Anonymous 

    Not sure I quite understand the first part of your answer.  What do you mean by Dropdown2Default  my dropdown is currently called datacardvalue42

     

    The dropdown box is a SharePoint, so does this change anything, i am going to test by adding a combo box from controls and try your context varible

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @sbonera ,

     

    Dropdown2Default  isn't a control, it's a variable with the value "MANAGER".

    I just love variables but honestly you can just do it without UpdateContext.

    You can put the Default statement of DatacardValue42 on "MANAGER", and your OnCheck statement of DatacardValue41 on Reset(DatacardValue42)

     

    It's really short but it works. The problem is that each time you'll go on your app, "MANAGER" value will be selected by default.

     

    Louis

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard