- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2021 06:23 AM
Hi All,
I have created a new Announcement and entered summary into it. But the complete announcement is not shown until it is expanded. How to make the complete announcement visible on load itself.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2021 09:06 AM
Yes you can , you have to dig into the widget client script.
Clone the "Announcements" widget and set a.expanded = true; in client controller script.
If my answer helped you, kindly mark it as correct and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2021 08:15 AM
So in that case you can try to create your own widget.
You will need to do the glide record on announcement table and get summary of active announcement record and show it over widget html script.
Sample code: for further styling modification, you can add css .
HTML:
<div class="details" >
<table>
<tr ng-repeat="announce in data.announcement">
<td>
<ul>
<li>{{announce.summary}}</li>
</ul>
</td>
</tr>
</table>
</div>
Server Side Script:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
data.announcement = [];
var gr = new GlideRecord('announcement');
gr.addQuery('active',true);
gr.query();
while(gr.next()){
var announce = {};
announce.summary = gr.getDisplayValue('summary');
data.announcement.push(announce);
}
})();
If you want to apply CSS , kindly check the link and apply the css based on your need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2021 08:18 AM
Hi
Instead of creating new Widget, is there any chance to modify lines in cloned widget, just to make announcement widget always expandable?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2021 09:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2021 10:11 PM
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2021 04:23 AM
Let me know if you need any further help.
If my answer helped you, kindly mark my answer as correct and close this thread, so that others can benefit from similar question in future.