how can i send 2 parameters from GlideAjax.I have written the code but doesn't seems to be working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 09:20 PM - edited 07-24-2023 09:20 PM
Hi All,
I want to pass two parameters from client side to server side (script Include), I am using change client script and sending data to the script include.
var ga=new GlideAjax("script_Include_name");
ga.addParam("sysparam_name", "function name");
ga.addParam("sysparam_user_name", g_from.getValue("start_date");
ga.addParam("sysparam_user_name2", g_from.getuniqueValue());
ga.xml(callback);
Script Include:-
var date=this.getParameter("sysparam_user_name");
var sys_id=this.getParameter("sysparam_user_name2");
I am also printing it in logs, i am getting only one value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 10:13 PM
@Priya75 Update your code in client script as follows.
var ga=new GlideAjax("script_Include_name");
ga.addParam("sysparam_name", "function name");
ga.addParam("sysparam_user_name", g_form.getValue("start_date"));
ga.addParam("sysparam_user_name2", g_form.getUniqueValue());
ga.getXML(callback);
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 10:18 PM
Hello @Priya75
g_form is misspelt in your code, it should be g_form.getValue() and g_form.getUniqueValue().
If this does not solve the issue, please post your entire script.
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 10:23 PM
These all things are fine, i have misspelt it here. But my issue is that i can only pass one value and other one is coming as null.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 11:24 PM
Can you post screenshot of both script include and client script here? without those, it will be difficult to debug.
Thank you,
Ali