Hi all,
I am wondering how to construct a AQL query to count all laptops of dedicated model by the status "on stock".
Rgds,
Gregor
Something like this should do it for you:
"Status" IN ("On stock") AND "Model" IN ("13-inch Mac")
Great Mikael,
It works well. Could I somehow count number of those matching this condition and based on a number (eg. < 10 ) trigger a ticket in JIRA - "Low stock (<10) of 13-inch Mac, purchase more"?
What would be the query to count them?
Many thanks in advance!
BR, Gregor
The only way to get the count would be to use an automation to get the size returned from an object lookup. You could make the rule a scheduled one and if the returned size is < 10 send a notification.
This is exactly what I need - in the automation part of Assets I would like to schedule an automation to create a ticket when the condition is True. The condition is: when the number of Laptops with the Status = "Availalble" is < 10 (less than 10).
Is there any list of builtin functions (total, count, sum, size, ....), the syntax and any kind of example of usage?
It looks like you're new here. Sign in or register to get started.