How to pass a table's field values from server to client via a widget in Service PortalIssue Widgets are one of the necessities in Service Portal. They can be used in various cases. One example is passing a the field values in a table from server to client using the widget in Service Portal. ResolutionThe data is the object that binds the Server Script and Client Controller in the widget. You can use this object to add more variables or properties to pass data. For example, you may want to to display an existing user's First Name and Last Name from the sys_user table in the console (or alert box) via a widget. To do this, 1. Create a new widget and add the following: Body HTML template: <div class="panel panel-default">> <button type="button" class="btn btn-primary btn-block" ng-click="c.uiAction('Show')">Just Do It!</button></div> Server script: (function() { /* populate the 'data' object */ /* e.g., data.table = $sp.getValue('table'); */ var userRecord = new GlideRecord('sys_user'); userRecord.addQuery('sys_id', 'sys_id_of_a_user'); //Add any other condition - This is a sample userRecord.query(); var user = {}; //User's record object containing values if(userRecord.next() && input && input.action){ data.user = user; if(input.action == 'show'){ data.user.first_name = userRecord.first_name.toString(); data.user.last_name = userRecord.last_name.toString(); } }})(); Client Controller: function() { /* widget controller */ var c = this; c.server.update(); //overwrites the data object with new updated contents console.log("User's first Name: " + c.user.first_name); console.log("User's first Name: " + c.user.first_name);} 2. Add this widget to a page, and then open that page in Service Portal. When you select this widget (that's loaded), you can check the console for desired data populating. Note: Widgets can't access catalog variables on the Service Portal page, so manipulating the page won't be possible.Related LinksSee the product documentation on Service Portal widgets, Performance analytics widgets