Hi,
I have two objects:
Now, I would like to use a reference to an attribute of "Device Models" in order to display the price and article number of a "Phones" asset.
I know that in the attributes of "Phones" I can create an attribute of type object and reference to "Device Models", but how can I reference to the attribute "price" or "article number" in the foreign "Device Models" object?
The goal is to e.g. show the price and article number of the specific "Phone" asset when viewing it.
Thank you for any suggestions and thoughts.
Best Regards,
mb
I think its not direct possible...
We had a similar need and used a workaround:
On Create/Update of an Object we use an Automation to copy the Values. So the Attributes have to be doubled, which is not sooo nice, but we get an Object with all Details without manual interaction.
We have to keep in mind, that changes on "the price" dont reflect directly in the "Phones". If needed, another Automation has to be implemented (maybe a nightly run over all objects)
Hello MF and thank you for your input,
Using an automation on object updated makes sense, but I cannot seem to get it to work:
Could you please share your automation?
I am not sure why my second lookup doesn't work (I tried the different values one by one as written above). I am also not sure how I can edit the related object because I think my automation only looks at the objects that are of type "Device Models" due to the Branch FOR AQL.
Maybe For each would be better? (EDIT: For each did not work either, but I used MF's approach and it's working now)
Thanks and Best Regards,
mb
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you can simplify (at least thats our approach)
Trigger -> When Object is created/updated
When -> ObjectType = "Phone"
Then -> Edit Objectattributes -> phonePrice -> {{object."Device Models".price}} (add more attributes)
Repeat with ELSE for other types.
You still need the "connected" Objects (here "Device Model") as referenced Attribute on the "Phone" Object.
//
If your intention was, to set all "Phones", when changing a "Device Model" I think it is easier to Query all Phones and set their "price" than the other way.
In your example the automation will be "expensive" as it will run on every Object Update, even, when its not necessary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your solution MF,
i am trying to rebuild this in here https://community.atlassian.com/t5/Jira-Service-Management/Jira-Asset-Append-Attributes-from-referenced-objects/qaq-p/2881324
but somehow it doesn't work...
can you assist ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manuel Probst ,
I think object.field.attribute is the correct way...in your example {{object.customer.Kürzel}} (don´t know if the Umlaut is correct handled).
(The above example seems to be misleading with the given naming)
For clarification, you can Debug/use protocol action to view the current {{object}} - this should lead you to the correct string.
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.