Hi,
I'm trying to set up an automation rule that sends alerts when an attribute integer value is set to a value less than that of another attribute. For example, item's "available stock" and "stock alert threshold", and whenever the value of "available stock" falls beneath the threshold value and e-mail will be sent.
The IQL ("available stock" <= "stock alert threshold") returns nothing, but if I write ("available stock" <= 10) the IQL works.
Could it be that Insight doesn't support comparing two attribute values?
Thanks!
Mohannad
Hi Mohannad.
The Automation Condition (IF) uses an IQL statement, which does not support placeholders to replace the Value of an Attribute.
I would like to recommend you to visit https://jira.riada.io which is our open ticket system for feature requests and verified bugs. You can view, watch, vote and comment on issues reported by anyone.
If you can't find an already opened ticket request for this feature, feel free to create a new one.
Your first query is trying to match an Attribute Value (in the Attribute "Available Stock") against the string "stock alert threshold" hence - it fails. (e.g. 7 <= "stock alert threshold" ), while your second statement is validating an Attribute Value against a Value; 7 <= 10 -->>>True
If placholders were supported in the IQL, the statement should have been "Available Stock") <= ${stock alert threshold}
// ${...} is a placholder for the Attribute Value //
At the moment, a way to resolve this is by having an Automation Rule to run a Groovy Script Action which will compare the Attributes' Values - and, either run the expected Groovy script if the condition is True, or, as an example, set a Boolean Attribute as a Flag, for another Automation Rule to pick up resulting in a different Action (When Object Updated, If objectType = "yourObjectType" AND "Below Stock Threshold" IS True, then.....
Kind regards,
Yinon
Team Riada
Hi Yinon,
If have a short, similar question, by comparing it attributes if same or not. By our SCCM import we have Top console user and Primary user, and I want to check by a automation if there containing same object or not.
Here you see, that the attribute not same
and here is the attribute same:
So what we want in the End, if Top console user is not same as Primary user to send an E-Mail, Create a ticket or whatever. I didnt could make any IQL which was resulting correct.
Thanks
Oli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oli.
For the case showing in your first screenshot - you can trigger an action with an IQL condition like:
("Top Console User" IS EMPTY AND "Primary User" IS NOT EMPTY) OR ("Top Console User" IS NOT EMPTY AND "Primary User" IS EMPTY)
However, if these two Attributes are NOT EMPTY (i.e populated) - then the only way available at the moment, to compare the two values, is by running a Groovy Script Action, which will also take care of sending an email / create a Ticket - if the Values do not match...
As noted here - there is currently no option, to compare two Attribute Values.
Cheers,
Yinon
Mindville support Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm new to groovy, and there is less documentation. Is there any documenation like a howto from scratch to work together with groovy and insight? The examples more confusing me on the documentation from insight :)
THanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.