Hide Catalog Variables Based on Order Guide (Client Script Approach)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi Community 👋,
I wanted to share a simple and effective approach to show/hide catalog variables based on a specific Order Guide.
🔍 Use Case
The same Catalog Item is used in multiple Order Guides
Certain variables should be hidden only for one specific Order Guide
The same variables should remain visible for all other Order Guides
UI Policies were not sufficient in this case, so I used a Catalog Client Script.
🛠 Solution Overview
Detect whether the form is opened via an Order Guide
Read the Order Guide sys_id from the URL (sysparm_guide)
Conditionally hide or show variables using g_form.setDisplay()
Sample Client Script
Notes
Always verify the sysparm_guide value from the browser URL
Test in both Native UI and Service Portal (URL handling may differ)
For multiple Order Guides, you can extend this logic using an array of sys_ids
💬 Final Thoughts
I hope this helps anyone facing similar Order Guide–specific requirements.
Please feel free to share improvements or alternative approaches.
Thanks! 😊
Venkat Ajay P