Reply
Level: Powered On
Posts: 6
Registered: ‎12-01-2017
Accepted Solution

Creating + - buttons for a gallery

Have a gallery where I want simple buttons to add and subtract from the stock want to avoid using a form to input this data.


Accepted Solutions
Highlighted
Community Administrator
Posts: 850
Registered: ‎05-04-2016

Re: Creating + - buttons for a gallery

You can use a Patch based on the value of the current item in a gallery. For example, if the quantity you want to increase (with the '+' button) is on a column called 'Quantity', you can have the OnSelect property of the button set to

Patch(<data source name>, ThisItem, { Quantity: Quantity + 1 })

View solution in original post


All Replies
Highlighted
Community Administrator
Posts: 850
Registered: ‎05-04-2016

Re: Creating + - buttons for a gallery

You can use a Patch based on the value of the current item in a gallery. For example, if the quantity you want to increase (with the '+' button) is on a column called 'Quantity', you can have the OnSelect property of the button set to

Patch(<data source name>, ThisItem, { Quantity: Quantity + 1 })
Level: Powered On
Posts: 6
Registered: ‎12-01-2017

Re: Creating + - buttons for a gallery

Thanks Carlos this worked out nicely, the ones that i tried didnt work.