JSON to see 2 or more fields as additional Options in Simple List Widget?

briandocili
Kilo Explorer

I have cloned the Simple List widget as my own.   I am using Incident as the table with Short Description as the main field shown.   I am trying to configure the JSON to show 2 additional fields;   Priority and Number.   I can only get one field to show.     The second field (or third, etc) is just a dot.  

ScreenShot.tiff

Here is my JSON.   Is there additional JSON or configuration in the Widget instance that I need to set up to allow more than one field.

{

  "secondary_fields":{

  "value" : "number, priority", "displayValue": "number, priority"

  }

}

7 REPLIES 7

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Are you using the widget editor dialog to configure the additional fields?   I went to page designer, clicked the pencil to edit the widget added priority to an existing simple list and it works fine:


find_real_file.png



If I view my widget in the platform, this is what was set:


"secondary_fields": {


              "value": "number,sys_updated_on,priority",


              "displayValue": "number,sys_updated_on,priority"


},


fosborne
ServiceNow Employee
ServiceNow Employee

Hi Brian,


I think you need to remove the spaces after the commas.


Try this:


{


  "secondary_fields":{


  "value" : "number,priority",


  "displayValue": "number,priority"


  }


}


Thank you.   This worked.



For Michael, I am quite frustrated with the Widget editor dialog.   I don't get the additional fields area.   I have to use the JSON to add them.   Did this change in Istanbul?



Screenshot.jpeg


fosborne
ServiceNow Employee
ServiceNow Employee

Hi Brian,


I remember before I used to see the secondary fields option that Michael is showing


But now mine is same as yours.


I could not even find it in the configure layout for the form to add it as form field.


Not sure how it got changed yet.


I am running Istanbul patch 3a



-Fred