How to call Script Include using Jelly Script ?

Chandra51
Tera Contributor

<?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:ui_reference name="active=true" id="name" table="sys_user_group"/>
<g2:evaluate>
var out= new SurveyUtilities().getSurvey();
</g2:evaluate>
<p>${gs.getMessage(out)}</p>
</j:jelly>

I am getting output like this.

find_real_file.png

6 REPLIES 6

Pratiksha Kalam
Kilo Sage

Hello,

<script>

  function runCode()

 

  {

 

  var ga = new GlideAjax('NewIncludeClient');

 

  ga.addParam('sysparm_name','function1');

 

  ga.getXMLWait();

 

  var result=ga.getAnswer();

 

  alert(result);

 

  }

 

  </script>

inside jelly script tag..

If answer is helpful please mark correct!

Thanks,

Pratiksha

I think  ga.getXMLWait(); maks synchronous call, any suggestion using asynchronous call?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can call script include from g:evaluate tag

Can you explain what you are trying to achieve here?

the script include function what and what you want to do with the values

Are you saying the value which is coming from the script include function should be set in that text box?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader