Where can I find the data for $sp.getWidgetFromInstance ?

Oscar14
Tera Contributor

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.

 

1 ACCEPTED SOLUTION

AnirudhKumar
Mega Sage
Mega Sage

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:

find_real_file.png

 

$sp.getWidgetFromInstance('Most Viewed') will give you the sys id of the widget Knowledge MostViewed Articles

View solution in original post

1 REPLY 1

AnirudhKumar
Mega Sage
Mega Sage

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:

find_real_file.png

 

$sp.getWidgetFromInstance('Most Viewed') will give you the sys id of the widget Knowledge MostViewed Articles