- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 05:52 PM
I have a working widget with html, css, client script and server script.
I am able to see table data but I am confused on why it's $sp.getWidgetFromInstance("my_items_incidents") instead of ("incidents")?I couldn't find any documentation of how to navigate to $sp.getWidgetFromInstance. I'm pretty sure once I know, I can add a specific table for example sc_task and name it $sp.getWidgetFromInstance("my_items_sctask"). When I try doing $sp.getWidgetFromInstance("sc_task") I am not seeing any data.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 06:30 PM
Hello Oscar,
The getWidgetFromInstance function does not accept a table name.
It accepts an Instance (the Title field value from an instance - sp_instance) and returns the widget stored in the Widget field.
For example, see the image below:
$sp.getWidgetFromInstance('Most Viewed') will give you the sys id of the widget Knowledge MostViewed Articles

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 06:30 PM
Hello Oscar,
The getWidgetFromInstance function does not accept a table name.
It accepts an Instance (the Title field value from an instance - sp_instance) and returns the widget stored in the Widget field.
For example, see the image below:
$sp.getWidgetFromInstance('Most Viewed') will give you the sys id of the widget Knowledge MostViewed Articles