A user creates a new Line Item object. I want to increment the Total field on the referenced Invoice with the Amount on the Line Item. I do not want to have to go through a linked issue.
How would you implement this?
Hi @C. Derek Fields ,
You could create an automation rule that is triggered upon the creation of a new Line Item object.
In the automation rule, you get all Line Items via an AQL statement, loop though the results and make a sum.
Best regards,
Kris
I will try that - thanks for the suggestion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kris Dewachter - Just a note that in order to make the summation work, I needed to join and split the Amounts in the list, like this:
{{lookupObjects.Amount.join(":").split(":").sum}}
I provide that in case you ever need to do something similar. Apparently, just using "sum" on the list doesn't work for reasons that I don't understand.
However, the problem that I really want to solve is to update an object that is not the object that triggered the rule. The only way I can see that I can update a referenced object attribute is to do it through an issue whether that object is referenced.
What would be ideal would be an Assets action that would take an Object Schema and Object Key (as a smart value) and let me update the attributes. However, that doesn't exist. I can only update the object that actually triggered the automation.
Any other ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @C. Derek Fields ,
Have you tried creating a AQL branch in the automation rule to get the object you need, and use the "Update Object" action in that branch?
Best regards,
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kris Dewachter - Thanks for the suggestion. That very well may work - I wasn't thinking in terms of AQL branch setting the {{object}} smart value. That should get me where I want to go.
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.