Provide a way to Append Values to existing Values in an Assets Object Attribute via Actions in Automation

XMLWordPrintable

    • 101
    • 13

      Problem Definition

      There is not a way to easily append values for Assets Object Attributes via Automation.

      Suggested Solution

      Have an Append Option on an Object Attribute in Actions like the Edit Object Action.

      Alternatively, have the input to these Attributes parse correctly when provided a list of Object Keys or IDs, such as something like:

      {{issue.AssetsCustomField}}, {{object.Attribute}}
      

      Where the above would render to something like:

      ABC-123, ABC-124

      And would set the Value of the Attribute to the provided Objects (in this case, ABC-123 & ABC-124).

      Workaround

      This article provides a workaround using the Send Web Request Action:

      An alternative, more easily approachable workaround is to use a combination of Create Variable Action & the .split Function.

      In Automation Rules, Smart Values have Types. Those can be reviewed here:

      The Create Variable Action creates a String. Using something like this:

      {{issue.AssetsCustomField}},{{object.Attribute}}
      

      Will create a text String like this:

      ABC-123,ABC-124, ABC-125,ABC-126
      

      Where the first 2 Keys are from the first Smart Value, and the second 2 Keys are from the second Smart Value.
      Then, we can take this new Smart Value created by this Action and convert it to a List like so:

      {{createdVariable.replace(", ",",").split(",")}}
      

      The .replace is necessary to remove the extraneous space. This will produce a List, which is what the Edit Object Action needs when setting Object Attribute Values.

      And with that, we can append values without the Send Web Request Action.
      We could even remove values using other Text String Smart Value Functions in the middle of the process as well.

            Assignee:
            Unassigned
            Reporter:
            Payden Pringle (Inactive)
            Votes:
            77 Vote for this issue
            Watchers:
            35 Start watching this issue

              Created:
              Updated: