Query filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 05:18 AM
Hi Team,
Can someone please help me on the below query.
- Assignment group = PSOAu - FPCS - Control Systems Select
- Filter: sys_class_name=cmdb_ci_win_server^ORsys_class_name=cmdb_ci_linux_server^install_status=1^manufacturerLIKEVMware^dns_domainINjbar.irnnew.bhpbilliton.net.au,mac.irnnew.bhpbilliton.net.au,mookaocrs.com,nhub.irnnew.bhpbilliton.net.au,npd.irnnew.bhpbilliton.net.au,ob24.irnnew.bhpbilliton.net.au,port.local,waio-opsnet.local,yandi.irnnew.bhpbilliton.net.au';
- Assignment group CONTAINS Hosting AND Assignment group CONTAINS Hypervisor
- Filter: sys_class_name=cmdb_ci_win_server^ORsys_class_name=cmdb_ci_linux_server^install_status=1^manufacturerLIKEVMware
- Assignment group = Hosting - Tools & Auto - Automation - MinAu
- Filter: sys_class_name=cmdb_ci_win_server^ORsys_class_name=cmdb_ci_linux_server^install_status=1^manufacturerLIKEVMware
Want to write a script for the conditions need to visible on the selected server variable it is reference table for the server class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 05:25 AM
Hello @nikhitha24 ,
you can use an Advanced Reference Qualifier to achieve this,
1) Create a script include with a function that needs the assignment group, script the logic based on assignment group what filter to use and return the filter in string format
2 Call the script include from your advanced RQ - javascript: new yourScriptInclude.yourFilter(assignement_group_id)
that way every time the assignment group changes the RQ is going to be different for the server.
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 08:19 PM
Could please share the code as i have written the script include but it is showing no data to display when i select the variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 11:32 PM
Hi @nikhitha24
Just to be clear with the requirement, you want to auto-populate the Assignment Group based on value of Server Variable which refers server class table and the filter conditions you mentioned above . Is my understanding correct ?
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 11:49 PM
Hi @Amit Verma
Based on the selected server ci variable i need to write a script if a logged in user is part of that group in the selected server ci i can able to see those filter condition ci in this variable.
script: