The CreatorCon Call for Content is officially open! Get started here.

Import Sets JSON files "Path for each row" missing

Jamie Cockrill
Giga Contributor

Hi, I'm new to ServiceNow development so if this has an obvious answer I apologise in advance.

I'm trying to create a Data Source so that I can use Import Sets and Transforms to load data into ServiceNow. I seem to be failing at the first hurdle which is to create a valid JSON File Data Source.

I have seen the following documentation pages:

  • https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/import-sets/reference/r_FileTypeDataSource.html
  • https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/import-sets/reference/json-data-source-examples.html

And I appear to be missing is a "Path for each row" field on the form which enables me to tell it where to find the array root element. The field is not appearing for me at all, even if I select the 'Personalize Form' control on the form itself.

find_real_file.png

This is my second Personal Developer Instance, having reset my first thinking that I could've screwed up the instance somehow. All I have done since getting each instance is to install Vulnerability Response. I have made no further changes.

What I would like to understand is to how to create a JSON File Data Source in the absence of the "Path for each row" field in the UI. I'm happy if there is another way, I just can't find documentation associated with that.

Thanks,

Jamie Cockrill

1 ACCEPTED SOLUTION

I've tested it in Rome and San Diego. in San Diego - Please add "Path for each row" to "Default view" else try it from list view to update the value of column "Path for each row".

For your reference.

find_real_file.png


Thanks & Regards,
Vasanth

View solution in original post

11 REPLIES 11

I've tested it in Rome and San Diego. in San Diego - Please add "Path for each row" to "Default view" else try it from list view to update the value of column "Path for each row".

For your reference.

find_real_file.png


Thanks & Regards,
Vasanth

This turned out to be the way I solved it for my case - for whatever reason on the form itself the 'Path for each row' field is not available to be selected. See below:

find_real_file.png

However I can add it to the table as suggested here and then edit it from the list view.

find_real_file.png

Absolutely maddening and we haven't really solved the underlying issue that is preventing the field from displaying, but at least it can be edited from the list view.

 

Thanks

Hi @Jamie Cockrill ,

As per the screenshot, you are trying to Personalize your form, instead of adding the field to the form.

Step 1: To add the field to the form, Please right click on the form header and the follow the step "Configure > Form design".  Form design will open in new tab.

find_real_file.png

Step 2: Search the field "Path for each row" under section "Fields"

find_real_file.png

Step 3: Click and Drag the field to the right on the form and Save the change.

find_real_file.png

Step 4: Reload your form again to show the field.

find_real_file.png


Thanks & Regards,
Vasanth

Hitoshi Ozawa
Giga Sage
Giga Sage

Jamie,

This is how I was able to load the json data. I've created a table to hold the data beforehand.

  1. Go to "System Import Sets" > "Data Source".
  2. Defined new Data Source as follows:
    find_real_file.png
  3. Go to "System Import Sets" > "Load Data"
  4. Select "Create table" and select the "Data source" to the data source created above.
    find_real_file.png
  5. Select "Create transform map"
    find_real_file.png
  6. Select target table and click on "Auto Map Matching Fields" under "Related Links"
    find_real_file.png
  7. Fields are mapped between json and table.
    find_real_file.png
  8. Re-executed the Load Data. Click on the Import Set and there is a row with the data. (row number starts with 0 in the list)
    find_real_file.png

 

Forgot to add the last screenshot.

9. Data is inserted into the table I've created to hold the imported json data.
find_real_file.png