Show/hide widget based on incident state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 11:05 PM
Hello All,
I have created a simple widget that displays a text when user open an incident from portal in my requests page. The below is the HTML code done for displaying text in portal
HTML:
<div class="displaytext">
<h2>{{::options.title}}</h2>
</div>
I added the widget in required page and in instance option we have title filed where i have entered the required text to display in portal. Attached screenshot below
My requirement is to display the text "Display text" only when the Incident state is New. My custom text widget should be hidden when incident state is not new. I tried using Glide Record of incident table in server script and used ng-if directive in html but still I am not able to achieve the required. Can anyone help to achieve this by showing the custom widget based on incident state.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 11:34 PM
Hi @Ashwin Perumal1 ,
Please see below community post and Youtube video which go through how a customer can achieve the behavior in their Service Portal.
https://www.youtube.com/watch?time_continue=6&v=-eJMULIa43A