How to specify reference qualifier inside a UI Page

johannes5
Giga Expert

Hi ServiceNow Community Developers

I have a requirement to change the oob 'consume_a_consumable' UI Page and include the 'To building' field to it. I am able to do this however I am running into an issues that I am not sure how to overcome.

I need to lookup only active buildings however I don't know how to specify that inside a UI Page. For instance once I declare the field name and the table name using the following code:

<td><g:ui_reference name="cmn_building" table="cmn_building"/></td>  

how do I then specify that when the magnifying glass is clicked I only need to see active buildings in the lookup list. Right now when I click the magnifying glass I see all buidlings, I would like to filter out inactive ones but I don't know to accomplish that. Please advise.

Thanks,

Johannes

1 ACCEPTED SOLUTION

Cory, according to the UI Macro ui_reference, there's an attribute "query".



<td><g:ui_reference name="cmn_building" query="active=true" table="cmn_building"/></td>




View solution in original post

9 REPLIES 9

coryseering
ServiceNow Employee
ServiceNow Employee

Hi Johannes,



Change the name attribute to "QUERY:active=true":



<td><g:ui_reference name="QUERY:active=true" table="cmn_building"/></td>



This is specified in the Wiki page on extensions to jelly syntax:


Extensions to Jelly Syntax - ServiceNow Wiki


Cory, according to the UI Macro ui_reference, there's an attribute "query".



<td><g:ui_reference name="cmn_building" query="active=true" table="cmn_building"/></td>




Hi Chuck,

Can we put reference qualifier for glidelist ui macro... if yes could you tell me how

 

Thanks,

Abinash Dash

Does this work with UI macro with jelly script?