Data synchronization issue between the SharePoint list item and the ServiceNow tables.

vmanojkumar
Giga Contributor

Hello,

I have a use case where I have to sync the data from the ServiceNow custom m table to the share point list item. To achieve this I have used the existing Microsoft sharepoint online spoke and the OOB action "Update list item by ID". Where I have some issue in updating the data for "working system" filed of type choice (which accepts the multiple values) in the sharepoint list. In the custom table the working system field is of type list and I have configured the choices in the sys choice table. The real issue is I face some challenges in setting up the input variable is the action. For the field of type choice I can configure the input but for the type List I can't because of this I can't update the data to the sharepoint list. So It would be great if could assist me on this matter. Let me know if there is an alternate way for this.

2 REPLIES 2

Tanushree Maiti
Kilo Patron

Hi @vmanojkumar 

 

If In your custom table "working system" field you would have designed as list collector (for multi select values) instead of list, you would not have faced this issue.

I guess this would be the best design.

 

else  

1. you can create a custom action where using script you can set your input and output:

     var choiceArray = inputs.list_field_string.split(',');

                        outputs.formatted_array = choiceArray;

 

2. If you are still unable to see the multi-select field in the action's input list, you may need to use the Sharepoint Rest API to update the "working system" field.

Refer: https://learn.microsoft.com/en-us/answers/questions/5580581/update-sharepoint-multi-choice-field-pro...

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

vmanojkumar
Giga Contributor

Hello @Tanushree Maiti ,

The Working System field in the table is set as type "List," not a list collector, and it's not a catalog variable. This field is also being used in front-end widgets. Even though I've selected the "List" data type, I'm unable to configure the working system input variable in the "Update list item by ID" action by referencing the actual choices from the sys_choice table.

vmanojkumar_0-1777870890714.png