How to hide a widget on service portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 12:46 PM
I have a widget on the service portal. It becomes visible when the HR case is closed complete. I want to hide the widget after 10 days from the day it had become visible. Please let me know how I can achieve this. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 02:06 PM
You should just need an additional query to set data.visible = false once closed at is greater than or equal to 10 days ago in your server script. I'm unfortunately not at a computer to be able to construct the full addQuery for you.
Please mark helpful/correct if this has helped you.
Thanks,
Logan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 09:32 PM
I used ng-show="data.flag" and my server script set it to true if HR case state is closed complete.
You can also see more resources blow:
https://community.servicenow.com/community?id=community_question&sys_id=c415b80edb422890a08a1ea66896194d
https://community.servicenow.com/community?id=community_question&sys_id=3ffa0baddb5cdbc01dcaf3231f9619fc
https://community.servicenow.com/community?id=community_question&sys_id=ab4e8780db692f04d6a102d5ca961920
If my reply is Helpful/Correct, please mark the answer as Helpful/Correct. This will help others searching for a similar question, and will take the question off the unsolved list.