The CreatorCon Call for Content is officially open! Get started here.

Correct this reference qulifier please

Deepthi13
Tera Expert

Hi team, 

 

this reference qualifier is not working properly. please correct this,

^current.variables.role_add_users!='; after keeping this condition it is not working. This is kept because I dont want to show the values in drop down(list collector) when the role_add_users is empty. when it is filled then only related records should appear in the list collector.Please suggest

var queryString = 'u_catalog_item=1cf335b61b143d106bf5535b234bcb1f^u_active=true^u_parent_variable=' + current.variables.role_add_users.toString() + '^u_application_name=' + current.variables.region.toString() + '^current.variables.role_add_users!=';

8 REPLIES 8

Danish Bhairag2
Tera Sage

Hi @Deepthi13 ,

 

Can you try with below code, I have just added single quotes at that last query to denote  empty n kept the whole query in double qoutes

 

var queryString = "u_catalog_item=1cf335b61b143d106bf5535b234bcb1f^u_active=true^u_parent_variable=" + current.variables.role_add_users.toString() + "^u_application_name=" + current.variables.region.toString() + "^current.variables.role_add_users!=''";

Please mark my answer helpful & accepted if it helps you resolve your query

 

Thanks,

Danish

Sagar Pagar
Tera Patron

Hi @Deepthi13,

 

Try this updated advanced reference qualifier.

javascript:if(current.variables.role_add_users!=''){
var queryString = "u_catalog_item=1cf335b61b143d106bf5535b234bcb1f^u_active=true^u_parent_variable=" + current.variables.role_add_users.toString() + "^u_application_name=" + current.variables.region.toString();
}

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar

The world works with ServiceNow

Hi @Deepthi13,

 

I hope your issue is resolved now. Let me know if have issues or more concern about this.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar

The world works with ServiceNow

Hi Sagar, sorry for late response after weekend my shift started now only

I tried this is not working, please suggest


var roleAddUsers = current.variables.add_arp_archive_subsite_name.toString();

var queryString = 'u_catalog_item=708d0a9e1be871501e85106fbd4bcb85^u_variable_name=Add ARP Subsite Reports or Subsite Document Libraries^u_active=true^u_parent_variable='+current.variables.add_arp_archive_subsite_name.toString();

if (roleAddUsers) {
queryString += '^current.variables.add_arp_archive_subsite_name!=';
}