Data Table Widget

sgmartin
Kilo Guru

Using the Data Table widget in the Service Portal that comes with Helsinki.   Cloned it so that I could make it work for me.   I added the table name (change_request) and added the fields I wanted to see.   That however doesn't seem to be what that field means when I edit the widget.   The widget defaults to 4 fields (Number,Category,Short Description and Approval).   I did not select all of these and actually added a couple others I wanted to see but they don't show.   I love the look of the table that it presents, but it's just not acting the way I expected.   What am I missing about customizing/configuring a widget?

48 REPLIES 48

Where have you put this code and how is z being accessed from the HTML layer of the widget?


Hi Nia,



I have cloned the OOB widget "Data Table from Instance Definition" and added the above code in the server script below this code :


(function(){


/*   "use strict"; - linter issues */


// populate the 'data' object


var sp_page = $sp.getValue('sp_page');


var pageGR = new GlideRecord('sp_page');


pageGR.get(sp_page);


data.page_id = pageGR.id.getDisplayValue();


$sp.getValues(data);



**** i have pasted above code here****



if (data.field_list) {


data.fields_array = data.field_list.split(',');


} else {


data.field_list = $sp.getListColumns(data.table);


}


Hi, I believe that if the asmt_assessment_instance is created correctly it will hold values referencing the incident or RITM. If you show xml on asmt_assessment_instance you will see there are a few document_id fields. Potentially the record you are looking for should be referenced as a trigger.

Best,
Philip E.


ggg
Giga Guru

I have the Data Table with Instance Definition on a page with widget-form.

I set the Data Table with Instance Definition Behavior 'Link to this Page' property to the name of the page.

When i select an incident it diplays in the form widget.

I want to change this so that the incident appears in another widget on the form.

How do i tell Data Table with Instance Definition to display in a particular widget?