How to Set Widget Visibility... Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 12:12 AM
1. I have a requirement to have a particular widget for a special category of the Service Catalogs.
Please can you help me out in setting the visibility of particular widget over "sc_cat_item" page for a special category of the Service Catalogs.
2. Also, I want to hide the Submit Button on the "SC Catalog Item" widget for particular service Catalog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 03:32 AM
Ashish,
I just added some lines of code to a clone of the "SC Catalog Item" Widget - see attached screenshots. Getting the category worked fine for me.
I recommend using console.log() for all debugging of widgets, it even works in the server script part!
The element in the data.category array is called name, not title.
You also should ideally not declare your variable twice - just initialize it e.g. with true and set it to false if needed (or vice versa).
Cheers
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 04:32 AM
Hey Frank, You forgot to attach the Screenshot. Please attach !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 09:23 AM
fschuster Please can you share the mentioned Screenshots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 02:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2016 03:11 AM
Hey Frank,
Can You help me with the ng-show for a button.
Now I am able to fetch the Category in the logs but Either the button gets visible for all or None.
It is not following the condition passed in server Script.
As You suggested I am using a variable to set the visibility in HTML
<button ng-show="showCat" .......................>
This is BUTTON is Submit Button at the SC Catalog Item Widget.
Please guide ...