The CreatorCon Call for Content is officially open! Get started here.

How to Set Widget Visibility... Service Portal

ashishgupta
Tera Expert

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.

ctomasi

pradeepksharma

b-rad

26 REPLIES 26

fschuster



Hey Frank,



I was able to hide the widget for particular category...



But the Button on the Service Catalog Page is not getting hidden.



Please can you guide me the way to hide the Submit Button for particular Category.


Ashish,



Nothing different for a button than a standard <div>.



Let's say we got a Submit Button:


<button ng-if="c.data.showButton" type="submit" id="registerNow" class="btn btn-lg btn-primary btn-block">Register Now</button>



The only thing you would need to do is come up with a logic that sets the showButton variable to true/false on the server (or client) - depends how you determine the value.


Assuming you are doing this on the server you would simply have to add :


data.showButton = false;



In the HTML you are able to access that value with c.data.showButton.


Thanks fschuster and Mr. ctomasi



I will be in touch with you Guys as I am working for Service Portal and it is really very new and bit difficult to understand...



Thanks


We're doing a TechNow episode on this next week.



Ask the Expert: Share Portal, TechNow 28 | ServiceNow Community


Frank,



I have a requirement to hide a widget if a user is a member of a group. Can you provide some assistance on this?


Thanks