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.
Solved! Go to Solution.
Hi @YAYA :
I've made a test for your reference:
1\I assume there are two lists:
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"
Best Regards,
Bof
Hi @YAYA :
I've made a test for your reference:
1\I assume there are two lists:
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"
Best Regards,
Bof
User | Count |
---|---|
171 | |
95 | |
74 | |
72 | |
58 |
User | Count |
---|---|
215 | |
166 | |
97 | |
93 | |
74 |