Hi, I'm currently working on a tuck shop POS system for a small shop that I help out at, and I have currently run into a problem that I can't yet solve.
What I am trying to do, when I press sale, for one to be taken off the 'stock' value for the selected item, and one to be added to the 'sale' value for the selected item.
I have linked some reference images below.
Thanks Tom
Solved! Go to Solution.
Hi @TJL550 ,
Maybe you could try to use the Patch() function.
I have made a test for your reference.
1. Here is my SharePoint list.
2. Select the Button and apply the following formula on its OnSelect property as:
Patch('Tuck Shop - Stock Management',Gallery6.Selected,{Stock:Gallery6.Selected.Stock-1,Sold:Gallery6.Selected.Sold+1})
3. Select the Button and apply the following formula on its DisplayMode property as:
If(Gallery6.Selected.Stock-1<0, DisplayMode.Disabled, DisplayMode.Edit)
Result:
Best Regards,
Charlie Choi
Hi @TJL550 ,
Maybe you could try to use the Patch() function.
I have made a test for your reference.
1. Here is my SharePoint list.
2. Select the Button and apply the following formula on its OnSelect property as:
Patch('Tuck Shop - Stock Management',Gallery6.Selected,{Stock:Gallery6.Selected.Stock-1,Sold:Gallery6.Selected.Sold+1})
3. Select the Button and apply the following formula on its DisplayMode property as:
If(Gallery6.Selected.Stock-1<0, DisplayMode.Disabled, DisplayMode.Edit)
Result:
Best Regards,
Charlie Choi
Thank you so much!
This helped a lot!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
53 | |
52 | |
38 | |
38 |
User | Count |
---|---|
284 | |
97 | |
89 | |
81 | |
77 |