How do you create an array field in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2018 01:46 PM
I am still relatively new to SNOW and I do read the documentation and I do search for help in the community. I could not find any help in either placess for this issue. Please forgive me if this is a stupid question but how do you create an array field in ServiceNow, or can you?
I went to Tables and created a custom table and then I went to Dictionary and started creating fields for the new table. Then it came time to create an array and the only field type I could find that I thought might work is Data Structure.
Data Structure | Field that allows the selection of one of the following data structures and entry of values to organize particular information in the record.
|
I have no idea how to tell the system I want this to be an array. I suspect there may be a way to manipulate this type of field in a script but I need this to be on a form that users can input data into manually. Actually, I will need several array fields on the form for manual entry.
When I add the field to the form it is treated like a single string field.
I have no problem manipulating arrays in javascript and elsewhere but the arrays were always fields in the database.
Thanks,
John

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2018 01:51 PM
You can create a List field which works like array, but it should be linked to a table.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 06:26 AM
Hi Sanjiv,
Thank you for the suggestion. I don't think that will work for me though. The end game is that via Orchestration another app will have to come in and extract this data. Assuming I can get the data into the list the way I need to I'm not sure how much effort it will take to extract it in the way I need to.
Normally an array would work here. I'm thinking that instead of putting the data into separate elements of an array field I will have to create separate records in the table where they would all be linked by a common field.
Thanks again for your help. I will update this again if and when I come up with the right solution.
Thanks,
John