- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 05:13 AM
Hi!
I'm updating Look up select box reference qual with parameter Operational status is not Retired but something is odd and not working. Can someone can spot mistake?
This is for first field:
javascript:'u_active=true^u_region=pb^u_service_id.operational_status!=4^EQ'
This is for second field:
javascript:'u_db_name='+current.variables.select_db+'^u_active=true^u_region=pb+'^u_service_id.operational_status!=4^EQ'
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 08:09 AM
Remove both " + " and " ' " (+') - its not correct as you are concatenating to pb the plus sign and you close your string query by adding single quote and not closing it correctly. What happens is that you pass to the DB query like "gimme me active to be true and region to be pb+" here you end your string query and add ^u_service_id...so on. The syntax is incorrect in general as you need to concatenate stringified queryes with + and then use either variables, javascript calls or just add extra stringified query (like "active=true" + "region=pb", but not "active=true+"^region=pd -> this is very wrong syntax.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 09:36 AM
See, easiest way to check if you reference qualifier (refQual) is working is to open the referenced table in list view. Then just add your query directly to the filter (using SNUtils , in the URL, background script or other way - I can think of 2 more but those are a bit extreme and guru level to use). Example in pic.1 for SNUtils.
This way you will be sure that it will work. Use some hardcoded values for the variables (like if current.variables.user is used replace it with sys_id or value in other use cases).
Example for background script in pic.2. For URL in pic.3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 07:29 AM
The issue with your reference qualifier script for the second field seems to be a syntax error in the concatenation of the query. It seems there's a misplaced plus sign (+) after u_region=pb.
Try with below
javascript:'u_db_name=' + current.variables.select_db + '^u_active=true^u_region=pb^u_service_id.operational_status!=4^EQ'
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 09:08 AM
Hi @Julius28 ,
use below reference qualifier:-
1.This is for first field:
javascript:'u_active=true^u_region=pb^u_service_id.operational_status!=4^EQ'
2.This is for second field:
javascript:'u_db_name=' + current.variables.select_db +'^u_active=true^u_region=pb^u_service_id.operational_status!=4^EQ'
whenever you want to validate reference qualifier script copy and paste into background script from color you can understand.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Ranjit