Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

new related list

El Cuchi
Tera Guru

Hi There,

I created a cat item that has a variable (list collector) that stores one or more business applications.

I would like to create a related list in the "business application" form that shows all request items related to that business application.

I am not sure how to do this as the name of one or more business app are stored in a variable rather than a field and i also have more than one.

how do i do this?

 

regards.

 

2 ACCEPTED SOLUTIONS

James Chun
Kilo Patron

Hi @El Cuchi,

 

  • Create Relationship [sys_relationship] record. Something like the following

Refer to the doc for details - https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/administer/form-adminis...

JamesChun_0-1715648823399.png

Note that you would need to replace the sys_id in the query with your variable's sys_id

 

  • Open a Business App record and select Configure > Related Lists
  • Search by the relationship record's name and add it to the list on the right

JamesChun_1-1715648990811.png

Outcome:

JamesChun_2-1715649008315.png

 

Cheers

 

View solution in original post

Hi @El Cuchi,

 

You can add another line of code, something like:

current.addQuery('item=your_catalog_item_sys_id');

 

View solution in original post

3 REPLIES 3

James Chun
Kilo Patron

Hi @El Cuchi,

 

  • Create Relationship [sys_relationship] record. Something like the following

Refer to the doc for details - https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/administer/form-adminis...

JamesChun_0-1715648823399.png

Note that you would need to replace the sys_id in the query with your variable's sys_id

 

  • Open a Business App record and select Configure > Related Lists
  • Search by the relationship record's name and add it to the list on the right

JamesChun_1-1715648990811.png

Outcome:

JamesChun_2-1715649008315.png

 

Cheers

 

Hi James,

 

I configured the relationships record as you suggested and although it works, not only shows the requests where this business application was selected but it brings all different catalogue items.

I need the list to bring all requests but just for a specific catalogue item. It should show only the first 2 requests.

 

ElCuchi_0-1717144277616.png

thanks

 

Hi @El Cuchi,

 

You can add another line of code, something like:

current.addQuery('item=your_catalog_item_sys_id');