cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YAYA
Helper I
Helper I

increase/Decrease quantity Value

Hi, I have two lists, one for Software license and other one for User assigned IT  assets.

the software license list includes two columns, one for software name and other one is number of license.

the User assigned IT assets list has checkboxes columns for each software to check if the user has this software in his PC or not.

what I need in PowerApps is if I checked the software. the  number of license decrease one in software license list. as well as if unchecked the software the number of license increase one.

 

I am not sure if this is the best approach or if there is a better solution to do so.

 

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @YAYA :

I've made a test for your reference:

1\I assume there are two lists:

vbofengmsft_0-1634709630924.png

vbofengmsft_1-1634709639640.png

2\Add a gallery into the canvas app and set it's items property to:

'User assigned IT assets'

3\Add a checkbox(Checkbox1) into the gallery and set it's

Default

ThisItem.software1

OnCheck

With({TargetItem:LookUp('software license','software name'="Software1")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'+1}))

OnUncheck

With({TargetItem:LookUp('software license','software name'="Software1")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'-1}))

Text

"software1"

4\Add a checkbox(Checkbox2) into the gallery and set it's

Default

 

ThisItem.software2

 

OnCheck

 

With({TargetItem:LookUp('software license','software name'="Software2")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'+1}))

 

OnUncheck

 

With({TargetItem:LookUp('software license','software name'="Software2")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'-1}))

 

Text

 

"software2"

 

5\Add a checkbox(Checkbox3) into the gallery and set it's

Default

 

ThisItem.software3

 

OnCheck

 

With({TargetItem:LookUp('software license','software name'="Software3")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'+1}))

 

OnUncheck

 

With({TargetItem:LookUp('software license','software name'="Software3")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'-1}))

 

Text

 

"software3"

vbofengmsft_2-1634709886117.png

 

vbofengmsft_4-1634709911158.png

 

Best Regards,

Bof

 

 

 

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @YAYA :

I've made a test for your reference:

1\I assume there are two lists:

vbofengmsft_0-1634709630924.png

vbofengmsft_1-1634709639640.png

2\Add a gallery into the canvas app and set it's items property to:

'User assigned IT assets'

3\Add a checkbox(Checkbox1) into the gallery and set it's

Default

ThisItem.software1

OnCheck

With({TargetItem:LookUp('software license','software name'="Software1")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'+1}))

OnUncheck

With({TargetItem:LookUp('software license','software name'="Software1")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'-1}))

Text

"software1"

4\Add a checkbox(Checkbox2) into the gallery and set it's

Default

 

ThisItem.software2

 

OnCheck

 

With({TargetItem:LookUp('software license','software name'="Software2")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'+1}))

 

OnUncheck

 

With({TargetItem:LookUp('software license','software name'="Software2")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'-1}))

 

Text

 

"software2"

 

5\Add a checkbox(Checkbox3) into the gallery and set it's

Default

 

ThisItem.software3

 

OnCheck

 

With({TargetItem:LookUp('software license','software name'="Software3")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'+1}))

 

OnUncheck

 

With({TargetItem:LookUp('software license','software name'="Software3")},Patch('software license',TargetItem,{'number of license':TargetItem.'number of license'-1}))

 

Text

 

"software3"

vbofengmsft_2-1634709886117.png

 

vbofengmsft_4-1634709911158.png

 

Best Regards,

Bof

 

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,019)