how to use if/else statement in reference qualifier?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 10:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 10:19 AM
The best way is to call a script include and move your if-else and rest of the logic there
javascript: new ScriptIncludeName().functioNameName()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 10:50 AM
Hi Author,
It will not be best way to use if else in ref qualifier, you can use script include However, if you insist to use if-else Please refer below code.
javascript:if(current.variables.var1 == 'x')Group_member(current.variables.var2); else'active=true';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 01:27 PM
Hi ,
Can you refer below link once:
https://community.servicenow.com/community?id=community_question&sys_id=e521e3c81b4d40d0a59033f2cd4bcb98
Please mark it as helpful (or) correct if it fix your issue.
Thanks,
Sumanth.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 02:02 PM