I inherited automation rules from someone no longer at the company, and I only know the basics of JSON.
The rules are a mess and errors are logged 50% of the time, so I'm trying to clean them up.
My biggest problem at the moment is that I don't understand a particular component of the rules.
If I understand correctly, the previous component is looking up objects and retrieving the "ItApproverUserNames" attribute/field value, which is an array of users.
Looking at the block below, which is using the Edit issue fields action with the advanced or additional fields option - can anyone help me understand what "first" is doing after "ItApproverUserNames"?
Is it simply making sure it fetches the values from the first array item? If so, isn't that unnecessary - i.e., shouldn't it default to that if not specified?
{
"fields": {
"IT Approval": {{lookupObjects.ItApproverUserNames.first.asJsonObjectArray("id")}}
}
}
welcome to the community and thanks for your question.
To better understand your problem and the rule, could you please post a screenshot of the rule and the attributes of the object?
Thank you, Kai.
I ended up rewriting the rule entirely and resolved my issue.
The issue was very poor logical flow of the components and had nothing to do with the JSON that I was concerned about.
Appreciate your help!
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.