- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 04:09 AM
Hello,
I am having a requirement that is We have a variable 'Requested for user' needs to visible in the catalog item. The same catalog item we have have added in rule base order guide. In that oder guide the same variable ''Requested for user" needs to visible false. How to achieve this requirement.?Can anyone help me on this.
Thanks in advance.
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 04:38 AM
Hello @Servicenow de11 ,
In the variable editor, we can find Availability tab, you can just uncheck Visible on Guides option for you Requested for user, and you will not be see this variable on Order Guides
for reference please find the screen shot
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 04:38 AM
Hello @Servicenow de11 ,
In the variable editor, we can find Availability tab, you can just uncheck Visible on Guides option for you Requested for user, and you will not be see this variable on Order Guides
for reference please find the screen shot
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 04:42 AM
To achieve the requirement where the "Requested for user" variable is visible in a catalog item but hidden in the associated order guide, you can use a combination of UI policies and script logic in ServiceNow. Here’s a step-by-step approach:
Step 1: Create the Catalog Item Variable
- Create the Variable:
- Go to the catalog item and ensure you have a variable named "Requested for user."
Step 2: Create a UI Policy for the Order Guide
Navigate to UI Policies:
- Go to Service Catalog > Catalog Policy > UI Policies.
Create a New UI Policy:
- Click on "New" to create a new UI policy.
- Set the Table to the relevant Order Guide (e.g., sc_cat_item).
- Set the Short Description to something like "Hide Requested for User in Order Guide."
Set Conditions:
- Use conditions to check if the current catalog item is part of the order guide. For example:
- Condition: current.catalog_order_guide == true (you may need to adjust this based on your setup).
- Use conditions to check if the current catalog item is part of the order guide. For example:
UI Policy Actions:
- In the UI Policy Actions tab, add an action to set the visibility of the variable:
- Variable Name: "Requested for user"
- Visible: false
- In the UI Policy Actions tab, add an action to set the visibility of the variable:
Save the UI Policy.
Step 3: Test the Implementation
Test the Catalog Item:
- Open the catalog item directly and verify that the "Requested for user" variable is visible.
Test the Order Guide:
- Open the order guide that includes the catalog item and confirm that the "Requested for user" variable is hidden.
if you found this helpful please accept as solution and mark helpful
best
Chetna