ui page

MonishramP
Tera Contributor

Hi All,

I have created ui action as list choice. This UI Action opens a ui page where it contains the reference field "Select assignee". This should give the list of members of all my groups. I have written a script include to get the list. I am not sure of how to call the script include in the ui_reference field "Select assignee".

MonishramP_0-1715587439605.png

 

I am trying to call the script include in the above line using query="javascript:getMyGroupMembers" but this doesnt work. Not sure of how to make a call to this script. can anyone help me on this.

3 REPLIES 3

James Chun
Kilo Patron

Found the exact same question (word by word) that was posted 8 years ago. 
Did you just copy and paste it here?

 

https://www.servicenow.com/community/developer-forum/need-help-to-call-a-script-include-in-reference...

JamesChun_0-1715596336043.png

 

yes @James Chun , the solution is unavailable. Can you help me on this.

You can use the following HTML in the UI Page

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_query">
var query = new someScriptInclude().returnMember();
query;
</g:evaluate>
<g:ui_reference name="assignee_name" table="sys_user_grmember" query='${jvar_query}'/>
</j:jelly>

Replace it with your Script Include and its function.