I want to modify a rule so that it does not always run when an asset is updated, but only once a month.
I then copied the original rule and added a schedule in front of it with a lookup function, but it doesn't work. How else should I use it?
It doesn't work without the lookup function either. I just thought the rule needed something to tell it where to look.
Lookup function, Query: objectType = "[NAME]"
Brief explanation of the rule:
The rule should always run on the first day of the month and check how the name of an asset begins. If it begins with “XYZ,” a tag should be added to the field; if the name begins with “ABC,” a different tag should be added.
NEW ONE with errors:
Old one, works:
Hi @Antonia
When using as lookup you will need to branch based on the {{lookupObjects}} as you need to iterate over the found objects.
The initial rule acts on a change of a single object, by changing it to scheduled with a lookup it will find multiple objects and you will need to address each found object.
thanks for your reply.
So, under the lookup, I create a For AQL loop and then I have to put all the “If” and “Then” statements in the loop?
Or what exactly do I have to write in the lookup?
I have several requirements.
If an asset starts with “ABC”, write “abc” in the tag.
If an asset starts with “XYZ”, write “xyz” in the tag.
If an asset starts with “123”, write “890” in the tag.
I can also enter a query in the Branch (For AQL) field. What should I enter there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Antonia
You needed to branch on the lookup and then use If/els conditions in the branch
No you can branch for AQL, as you have multiple objects found
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean like this?
“For AQL” contains the name of the object type, which now looks for the entire type and then checks the conditions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Antonia
Yes, and...to the suggestion from @Marc - Devoteam
The branch to the objects is needed...however, the if / else condition block cannot be used inside of a branch.
One possible workaround for your scenario is use a Lookup Table to perform the mapping of values to tags, then use the table get() function to check for a result, and when found, add the tag.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot use automation to edit Assets objects without an associated work item. You always have to start with the work item and if that one is associated with an Asset object you do the editing of the object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, that's not correct. I've already created several rules that only have to do with assets. This rule also worked, but with a different trigger.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.