- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 01:28 AM - edited ‎12-24-2024 01:29 AM
Hi All,
I have a requirement to display a message on right side of Request form if the Catalog Item Variable values meet a condition.
I have created a widget to display message on the right side of "SC Catalog Item" page. I need your help in setting conditions based on the values selected on the Catalog Variable. I tried using below code in Client Controller:
Getting Error on Console - "TypeError: Cannot read properties of undefined (reading 'getValue')"
Please help with below:
1. getting the value of catalog item variable
2. Display the message widget based on conditions.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2024 09:10 PM - edited ‎12-30-2024 09:11 PM
Resolved now - Below is the steps followed:
1. Create a Widget to capture change in Catalog Item variable and broadcast a variable
2. Create a "Custom" Catalog Item variable and associate the widget created from step 1
3. Create another widget to display necessary text
4. Clone the OOB SC Catalog Item widget to capture the broadcast variable and embed the widget (to display to right side of the page) from step 3 based on broadcast variable value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 01:51 AM
where did you place this widget?
it seems your widget is not able to access the g_form object
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 02:01 AM
@Ankur Bawiskar Thanks for your response. I have placed the widget in global scope and called in HRM Catalog Item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 02:03 AM
so it's a custom widget in global scope and added to particular catalog item?
what is HRM catalog item?
have you added that as Custom variable and associated this widget to it?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 03:06 AM - edited ‎12-30-2024 01:07 AM
@Ankur Bawiskar I am able to display the widget(text) within the item form when the value selected is "value 2", however the requirement is to display the widget (text) to right side of the page below "Order Now". Please let me know if there is a way to achieve this.
Thanks,
Siva