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.