Hi all,
I have a form where someone can select user/s to be added as Business Owners for a process that is an object in Assets.
Select the business process. Select the user or users on the form, submit the request. When approved those users are added to the user attribute in assets, works fine.
Currently if there is already a user in the attribute it just gets overwritten. I want to just append the values from the work item process to the attribute in assets. If there is nothing there then the values are added, if there is something there then the new users are just appended and the stored user count grows.
I have an automation that currently now stores a various of the accountid/s of the values selected on the work item. I also do a lookup and grab any accountids that may already exist in Assets.
What I can't figure out is the JQL to edit the object attributes to append the new to the old.
Can anyone guide me on this one.
Thanks
Hi @Ste404
This may not be a JQL matter and instead an adjustment is needed to your automation rule in the list / value handling.
To provide more context for the community to help, please post the following:
Kind regards,
Bill
I have no idea why I can't reply with an image?!
I collect existing user accountid from Assets if there are any stored for the selected user.
{{#lookupObjects.get(0).Alternate Approver}}{{accountId}}{{^last}},{{/}}{{/}}
I collect the accountid for the new users on the work item
{{#issue.customfield_10240}}{{accountId}}{{^last}},{{/}}{{/}}
these are variables and I combine them.
Existing: 60ad2d2a06bf0c006a42fa84,60ad32ec411c2200684cd355,60ad34a79e21bd0071e6f4db
New: 60ad3708411c2200684d57fd,62b910c0268cac6e31c31251
In a for AQL loop I am editing the object attributes, but it is failing as I assume it is trying to write these as a string and not the correct value for the user type in assets
Attribute value is not valid on Objects
PPL-200 (Alternate Approver = 60ad2d2a06bf0c006a42fa84,60ad32ec411c2200684cd355,60ad34a79e21bd0071e6f4db,60ad3708411c2200684d57fd,62b910c0268cac6e31c31251)
Unable to update objects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the images, please select the "insert images" button when responding, select your local image, and upload it, resizing as needed.
Without seeing all the details of your rule and the audit log, it is quite difficult to know the cause of the symptoms.
From what you describe, it seems you are trying to add multiple user account ID values at one time rather than iterating over them. Again, seeing your rule and the log will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Basically yes, I have a variable created in the automation from accountid on the work item and a lookup from the work item also.
I have a for AQL branch
Object type = "people" and user = {{customfield_10239}}.
I am not sure how to step through the variable to pass the accountid to the attribute in assets to update it with as many accountid as there are in the variable. Can't branch in a branch (maybe you can) but I am stuck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorted out, wasn't splitting the combined variable properly. Works a treat now.
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.