cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Update to a different dropdown value

Hi! 

 

In my Power App, when user clicks an "Update" Button, I want the drop down value of one of the fields to change. 

 

Status is set as "New Bid" by the user when created. When I go to a certain page on my app, input details and hit update button, the status should change from "New Bid" to "Installation Input". 

 

error1.png

 

I've played around Set, Update Context functions but with no much luck. Any leads?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Update to a different dropdown value

Hi @mdevaney  and @v-siky-msft 

 

Thank you for your messages. It is a dropdown value, and also, I realized there's a simpler way to update the value of status (without using any default and hidden variables): 

 

Patch('Bid Management_1', First(Filter('Bid Management_1',Title = EditRecord.Title)),{Status:{Value:"Installation Input"}});

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Update to a different dropdown value

@qfatima
I believe this can be accomplished by making use of the Reset and Default properties of your dropdown control.

Put this code in the OnVisble property of the screen

Set(updateStatus,false);
Set(defaultStatus=“New Bid”);


Put this code in your Update button

Set(updateStatus,true);
Set(defaultStatus,”Installation Input”);
Set(updateStatus,false);


Put this code in the Reset property of your dropdown

updateStatus


Put this code in the Default property of your dropdown

defaultStatus


Note: this solution assumes the initial status is always New Bid upon entering the screen.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Community Support
Community Support

Re: Update to a different dropdown value

Hi @qfatima ,

 

Which control do you use? drop down control or combo box? Can you share the items property of it?

What is the date type of Status column? Choices?

I have made a test on my side, you can use variable to control the default of drop down.

1. Put Set(Var1,false) to OnStart of app or OnVisible of screen;

2. Put Set(Var1,true) to OnSelect of update button;

3. Set Default property of drop down as below:

 

If(Var1,"Installation Input","New Bid")

 

If the control is combo box, there is one difference.

you need to set the DefaultSelectedItems property instead of Defaults, step1 and step3 are the same.

please put the following formula to DefaultSelectedItems property of combo box:

 

If(Var1,LookUp(Choices('SP list'.Staus),Value="Team Records"),LookUp(Choices('SP list'.Staus),Value="Local Konwledge"))

 

Replace 'SP list' to the Name of SP list.

Annotation 2019-11-06 184436.png

Hope this helps.

Best regards,

Sik

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

Highlighted
Frequent Visitor

Re: Update to a different dropdown value

Hi @mdevaney  and @v-siky-msft 

 

Thank you for your messages. It is a dropdown value, and also, I realized there's a simpler way to update the value of status (without using any default and hidden variables): 

 

Patch('Bid Management_1', First(Filter('Bid Management_1',Title = EditRecord.Title)),{Status:{Value:"Installation Input"}});

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,869)