cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericongkc
Level: Powered On

update sharepoint value with button and show updated value immediately on Gallery Screen

Hi all

Can i make a button on my gallery screen so that when i click it, it will update my sharepoint Choice"Status" value to "inStock" and reflect immediatelly on the gallery "Thisitem.Status.Value" fomula?

 

What fomula should i put on this button - onselect

Screenshot 2019-10-22 at 7.48.26 AM.png

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: update sharepoint value with button and show updated value immediately on Gallery Screen

Hi @ericongkc ,

Do you want to:

if the button's text is inStock, click the button, the choice value change to inuse,

if the button's text is inuse, click the button, the choice value change to inStock?

You could try to set the button's OnSelect:

If(ThisItem.Status.Value="InStock",
Patch(listname,ThisItem,{Status:{Value:"InStock"}}),
ThisItem.Status.Value="InUse",
Patch(listname,ThisItem,{Status:{Value:"InUse"}}));
Refresh(listname) //please replace listname with your listname

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

2 REPLIES 2
Highlighted
Edwin-Abdalian
Level 10

Re: update sharepoint value with button and show updated value immediately on Gallery Screen

use the patch function on select of your Gallery.

Patch(
    'Your SharePoint List',
    ThisItem,
    {
        myChoice: {
            Value: "inStock",
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
        }
    }
)

 --------------------------------------------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

Community Support Team
Community Support Team

Re: update sharepoint value with button and show updated value immediately on Gallery Screen

Hi @ericongkc ,

Do you want to:

if the button's text is inStock, click the button, the choice value change to inuse,

if the button's text is inuse, click the button, the choice value change to inStock?

You could try to set the button's OnSelect:

If(ThisItem.Status.Value="InStock",
Patch(listname,ThisItem,{Status:{Value:"InStock"}}),
ThisItem.Status.Value="InUse",
Patch(listname,ThisItem,{Status:{Value:"InUse"}}));
Refresh(listname) //please replace listname with your listname

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 79 members 4,431 guests
Please welcome our newest community members: