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 III
Super User III

@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 III
Super User III

@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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (82,709)