cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CsaszarZsomle
New Member

Select choices by clicking on buttons

Hi Guys,

 

I have aSharepoint List with Choices type field called Status withchoices (unprocessed, for Sales Approval, for Confirmation, for Prepayment, for Shipment, for Invoicing, finished)  I use a PowerApps form to edit the list items. However users can select only a few items of Status for new value of Status based on the current value of Status.

Eg: Current choice : "unprocessed", new choices can be only "for Confirmation" or "for Sales Approval" or "for Prepayment".

if the Current choice  is "for Sales Approval" the new choices can be only "for Confirmation" or "for Prepayment" and so on. 

 

I placed buttons for each choices on the DataCard of Status which are visible based on current status. So far so good.

But how can I change the status clicking on one of the visible Buttons ?

  

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@CsaszarZsomle 
Place this code inside the OnSelect property of the 'for Confirmation button.  When the button is pressed it will change the status.

Patch(your_sharepoint_list, ThisItem, {Status = {Value: "for Confirmation"}});

 

Repeat as necessary for the other buttons while changing the status text.

 

---
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."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@CsaszarZsomle 
Place this code inside the OnSelect property of the 'for Confirmation button.  When the button is pressed it will change the status.

Patch(your_sharepoint_list, ThisItem, {Status = {Value: "for Confirmation"}});

 

Repeat as necessary for the other buttons while changing the status text.

 

---
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."

View solution in original post

So simple and works well 🤗

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,877)