
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2015 12:01 PM
UI Page containing multiple UI fields that need the same query on the same table. One would assume that you can give a ui_reference tag a unique ID, as told here you can: http://wiki.servicenow.com/index.php?title=Extensions_to_Jelly_Syntax#.3Cg:ui_reference.2F.3E, but that's not true.
Here's a visual of an example:
And the code:
<g:ui_reference name="QUERY:location=${jvar_userLoc}" id="testOne" table="sys_user" />
<g:ui_reference name="QUERY:location=${jvar_userLoc}" id="testTwo" table="sys_user" />
And when we pull up the UI page and inspect the element:
So the obvious question: How can I get multiple <g:ui_reference> fields that query the same table with the same query filter onto a UI page with different input id's?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2015 12:26 PM
David, you have to create a unique ID for each element. If you need to set a query, set the "query" attribute, not the "name" because, as you point out, the Name gets set as the input name when the HTML is generated:
<g:ui_reference name="user_location1" id="testOne" table="sys_user" query="location=${jvar_userLoc}" />
<g:ui_reference name="user_location2" id="testTwo" table="sys_user" query="location=${jvar_userLoc}" />

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2015 08:40 AM
Outstanding. Thank you!