You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am trying to automate incrementing and decrementing of software licenses whenever a user is assigned/provided with the software. We currently have attributes for Available, InUse, and Total relating to license counts.
Right now, we are using the following to try and get this working, with little success.
When an object is updated, the InUse attribute is set to equal the number of Users associated with the object.
Attribute InUse set to {{object.User.size}}
One of the issues we are having is that this will return (InUse = '') in the audit log.
I have tried using {{#=}}{{object.User.size}} + 0{{/}}, but this seems to sometimes just return a 0, even when it should be adding to it.
Additionally, we are having trouble getting this to populate properly and adjust the Available attribute count.
Attribute Available set to {{#=}}{{object.Total}} - {{object.User.size}}{{/}}
Any help would be appreciated, as object automation info seems to be on short supply
If you're trying to have a default value for when it doesn't exist you can do:
{{object.User.size|0}}
Which should default this to 0 if the value doesn't exist.
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.