Displaying Tables on the UI Builder from a JSON response

Joseph Testa
Tera Contributor

Hello, I have a JSON response from an API call that I want to display in a table format using the ServiceNow UI Builder. Is there any way to iterate through my data set and display a table? It seems like the Simple List and other table type components only display tables that are already in ServiceNow but don't allow for a custom input. Is there a way to do this or will there be in future releases? I also looked into remote tables a bit but I could not find a way to take inputs from the UI side and use them on the API call.

1 ACCEPTED SOLUTION

Tom Sienkiewicz
Mega Sage

I'm not sure if there is an existing component in the UI Builder that does that, but for sure you could develop a custom component that will render the input whichever way you like.

I know this adds a lot of overhead though, so it might not be the perfect solution. Hopefully there is an easier way.

I wonder if repeaters could be a solution for you:

https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/ui-builder/task/...

View solution in original post

9 REPLIES 9

Bernard Esterhu
Tera Expert

We also need to visualise JSON data in a list view - this is a feature that would be very useful!!

@Jay Gamblin thanks for this link, but this talks about importing data into a table. I need to display data in a JSON format in a list view in UI Builder.

While the attribute does nothing for a list view, you can somewhat improve the readability by formatting the JSON when writing it to a field using

JSON.stringify(data, null, 2) and it will show up easier to read on the list view.

 

Prakash_K
Tera Contributor

Hi, Did you find a good way to use the List View Component in UI Builder to Present the Array of Response from RestAPI (Data Resources --> Transform). 

 

I am in a situation where i have to call an external API and present the data in tabular view.