How to call Script Include using Jelly Script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2020 12:27 AM
<?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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2020 12:31 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2020 12:32 AM
Check this for reference,
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2020 01:08 AM
I think ga.getXMLWait(); maks synchronous call, any suggestion using asynchronous call?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2020 12:35 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader