- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 09:03 PM
I have created a custom import set table extended from Import Set Row. I have created custom columns in that import set table and assigned import_attribute_name to each column. I have also created a data source for that custom import set table.
When I am importing(attaching) a JSON file to the data source, data is not populated to a custom column instead new columns are created "u_" prefix, and data gets populated into the new columns having the "u_" prefix.
The import_attribute_name value of the custom column and the newly created column with the "u_" prefix is the same.
Why data doesn't get populated in the custom column from the data source?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 08:50 PM
Below is my finding and solution for this problem -
Findings -
If column name and import_attribute_name values are exactly(case-sensitive) same then ServiceNow doesn't assign import_attribute_name value to column name.
In the below case value of column name and import_attribute_name is the status(lowercase) hence data wasn't populated.
I am not sure whether this is expected behavior of ServiceNow or a bug in it.
Solution - Do not use the same value for column name and import_attribute_name. Either use a different value for column name or import_attribute_name value should be a different case.
e.g.
- If I am using the "status" value for Column name then import_attribute_name should be Status or STATUS.
- If I am using the "status" value for import_attribute_name then the Column name should have some prefix (u_) or suffix(_u) to status or a different column name (status_val).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 09:35 PM
Hi,
Usually fields get created with u_ prefix on import set table
In which other fields the data is getting populated in import set
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 09:47 PM
In the below example, data gets populated in u_status but not in the status column.
Why data doesn't get populated in the status column if both columns are having the same import_attribute_name?
Created column status with prefix u_ -
Custom column status -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 10:08 PM
Hi,
why did you create custom field on your own?
If you would have tried to load the json it would have created the new field on it's own
Any reason for that
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 10:21 PM
I don't need all fields of the JSON file in the staging table. JSON file have many fields. I need only some fields of the JSON file in the staging table that I will transform into the production table.