Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

encoded query

levino
Giga Guru

Hi there

please advise  , its calling a script include, just this part i am having trouble with on the cat item onload client script

Table sys_user_grmember

 

var thisUser = g_form.getValue("requested_for");

var encoded_query = 'group.nameSTARTSWITHlic_postman' + 'user=' + thisUser;​

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron

@levino It is generally not a good practice to put GlideRecord query in the client script. Your encoded query can be fixed as follows.

 

var thisUser = g_form.getValue("requested_for");

var encoded_query = 'group.nameSTARTSWITHlic_postman' + '^user=' + thisUser;

Hope this helps.

View solution in original post

1 REPLY 1

Sandeep Rajput
Tera Patron

@levino It is generally not a good practice to put GlideRecord query in the client script. Your encoded query can be fixed as follows.

 

var thisUser = g_form.getValue("requested_for");

var encoded_query = 'group.nameSTARTSWITHlic_postman' + '^user=' + thisUser;

Hope this helps.