cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GrischkePro
Advocate III
Advocate III

Update Choice field with a button OnSelect

In my EditForm, I have a Choice field Status with two options: Open/Closed. I want to hide this choice field, add a Close button that will change the value of the choice filed to Closed (and then Submits the Form).

 

I'm struggling to get the button working.

 

Any help will be much appreciated!

 

Nevermind, I found it: https://powerusers.microsoft.com/t5/General-Discussion/Update-SharePoint-list-choice-column-dropdown...

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @GrischkePro ,

Could you please share a bit more about the Choice field that you mentioned? Is it a Choice type column in a SP list?

Do you want to change the Choice field value within the Edit form to Closed when you click the "Close" button?

 

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

Set the OnVisible property of the Edit screen to following:

Set(ChoiceVar, Blank())

Set the OnSelect property of the "Button" to following:

Set(ChoiceVar, {Value: "Closed"})

Set the DefaultSelectedItems property of the ComboBox within the Choice field Data card to following:

If(
   !IsBlank(ChoiceVar),
   ChoiceVar,
   Parent.Default
)

Please take a try with above solution, check if the issue is solved.

 

If the issue is solved, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xida-msft
Community Support
Community Support

Hi @GrischkePro ,

Could you please share a bit more about the Choice field that you mentioned? Is it a Choice type column in a SP list?

Do you want to change the Choice field value within the Edit form to Closed when you click the "Close" button?

 

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

Set the OnVisible property of the Edit screen to following:

Set(ChoiceVar, Blank())

Set the OnSelect property of the "Button" to following:

Set(ChoiceVar, {Value: "Closed"})

Set the DefaultSelectedItems property of the ComboBox within the Choice field Data card to following:

If(
   !IsBlank(ChoiceVar),
   ChoiceVar,
   Parent.Default
)

Please take a try with above solution, check if the issue is solved.

 

If the issue is solved, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks @v-xida-msft,

 

This works great too!

Great solution

Hi ,@v-xida-msft 

 

i have a form which send a approval to user , and i have flow which triggers when a form is created or updated , i have column value called Review Value = reviewed /Not reviewed ,i am using this as condition in order to avoid the loop, but now i want to set the review value to not reviewed when a editing  a form and successful submission of an existing form to trigger the flow

 

please help

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,553)