Data Table from Instance Definition

Rama Chandra D
Kilo Guru

I see the following lines of code in Server Script code of the widget. What are available values for the view variable in this code,

var widgetParams = {

  table: data.table,

  fields: data.field_list,

  o: data.o,

  d: data.d,

  filter: data.filter,

  window_size: data.window_size,

  view: 'sp',

  title: options.title,

  show_breadcrumbs: true

  }

I'm trying to set a view other than what has been specified in OOB( view: 'sp' ) . How can I modify this value?

Regards,

Darshak

2 REPLIES 2

Miriam Berg
Kilo Guru

Hi Darshak,



I've been watching some training material regarding the new Service Portal and building Widgets, and as far as i have understood it, best practice if you need to modify a widget is to clone it and update values in the new widget.



  1. Go to Service Portal > Service Portal Configuration
  2. Choose Widget Editor
  3. Enter Data table from instance definition
  4. Press the widget menu in the top right corner and choose to Clone.Capture.PNG
  5. Now you can input another view value in the Server Script


Hope this helps!



BR /Miriam


dvp
Mega Sage
Mega Sage

If you want to pass the value dynamically add an option in the widget schema



find_real_file.png


and pass the value in Additional options, JSON Format field on widget instance as shown in the below format



{



  "view":   "test",



   



}