How to reference attribute data from a selected object in a form
Asked by Arnold Rolle:

Hi,

I am making a form which references an Object Schema of equipment with the attributes name, available, unavailable and total. I have 4 custom fields for accessing this data.

The first custom field populates the initial item selection dropdown list in the form. I would like the other 3 custom fields to automatically populate with the related attribute values for the selected object.

The first custom field works as intended, but I can't seem to reference the attributes of the selected object properly. I am most likely using the wrong AQL for this.

I've tried filtering the issue scope using **Object HAVING inboundReferences(Name=${customfield_xxxx.label})** and selecting the attribute I would like to populate the form dropdown lists in the **User interaction** section of the **Asset Objects field configuration** for the custom field. This populates the second dropdown with the same list of objects in the first dropdown instead of the attribute.

**Form**

![checkout.png](https://community.atlassian.com/t5/image/serverpage/image-id/322435iB2793B4465BA1F77/image-size/large?v=v2&px=999 "checkout.png")

**Example of an object in the Test Schema**

![schema.png](https://community.atlassian.com/t5/image/serverpage/image-id/322436iCC23D718DF1DAFBC/image-size/large?v=v2&px=999 "schema.png")

**Custom Field for number 2 (3 and 4 will be set up to search for their respective attributes.)**

![customfield.png](https://community.atlassian.com/t5/image/serverpage/image-id/322437iAE73B404FF914EC2/image-size/large?v=v2&px=999 "customfield.png")


Answers:
author: Vijay Dadi
body: [@Arnold Rolle](/t5/user/viewprofilepage/user-id/5492126) ,

From what I understood, native Jira doesn't have the functionality to populate the values of proceeding fields upon selection of current field. Correct if I am wrong.

I believe there might be some apps on the marketplace but I was expecting this bare minimum functionality with native Jira.

Happy to know more on this item.

Vijay

comments: author: Arnold Rolle
body: Thanks for the info, Vijay. I'll look into some marketplace apps.


author: Maximillian Tjhi
body: [@Arnold Rolle](/t5/user/viewprofilepage/user-id/5492126) Was wondering if you found a solution to this. Thanks!


author: Arnold Rolle
body: [@Maximillian Tjhi](/t5/user/viewprofilepage/user-id/5562351)   

You should be able to have a custom field show an objects attributes automatically on a form, but for some reason it does not work properly and will not automatically display the data upon selecting the device. This was the only work around I found to make it automatically populate upon selections.

If you want the data to show up automatically in the current version of JSM cloud, you will need to make an object type for each attribute and reference the main object.

For instance, I had Devices as my main object and wanted the attributes available, unavailable and total. I created those attributes as objects of their own and added a device attribute to them as an outbound reference.

On the form there were custom fields created for the device and each attribute.

Example of the Available custom field:  
Filter scope (AQL)  
objectType = Available  
Filter issue scope (AQL)  
Devices = ${customfield_\[customfield_ID}}  
(This custom field ID was the selected device on my form. It is looking in the available object for items with that outbound reference)

Display and search across these attributes in the custom field\*  
Name  
Display these attributes in the issue view  
Name  
(Set these to automatically show the Name attribute of the available object)


author: Maximillian Tjhi
body: Thank you millions for your reply. I'll attempt to implement - really appreciate the help!


Tags: cloud

jira-service-management

jira-service-management-cloud