Hello
I am attempting to set up a process where a Jira Request is submitted, automation is triggered, and attributes on an Assets Object is updated.
The catch is that the Jira Request will contain many fields that all correspond to many attributes on my object, but all fields will not always be filled in, as not all attributes will need to be updated.
I want to avoid just using branches in the automation, as the finished product is expected to have around 20-40 attributes, which would cause the automation to exceed the (arbitrary?) limit of 65 "components" pr. automation rule.
So instead I'm attempting to use Smart Values to only conditionally update the Object Attributes.
While setting up my PoC I am using the Issue Description to update an Object Attribute called "Description".
In my automation action that edits the Object Attribute I have attempted the following values:
{{#if(exists(issue.description))}}{{issue.description}}{{/}} - To only update the Object Attribute if the description exists.
{{#if(issue.description.length > 0)}}{{issue.description}}{{/}} - To only update the Object Attribute has a length greater than zero characters.
{{#if(not(issue.description.isEmpty))}}{{issue.description.size}}{{/}} - To only update the Object Attribute if the issue description is not empty.
{{#if(issue.description.length > 0)}}{{issue.description}}{{/}}{{^issue.description.length > 0}}{{object.description}}{{/}} - Provided by ChatGPT, in an attempt to fallback to the original Description attribute value if the Issue Description has no value).
But no matter what I do, when my Issue Description is empty, the Object Attribute is overwritten with nothing (in other words, it's cleared).
So... Am I attempting the impossible, or am I missing something?
Just to answer my own question, in case anyone else runs into this as well.
My solution ended up being this:
{{if(forms.last.description.equals(""),lookupObjects.Description,forms.last.description)}}
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.