Hi,
During our upgrade from Legacy to Windows , we are replacing our old Sharpoint activities with the new Microsoft Office 365 activities.
When trying to get sharepoint list items using the ‘For each List item’ we are encountering an error on one of our lists. The following error is given:
For Each List Item: The requested operation requires an element of type ‘String’, but the target element has type ‘Array’.
When checking the list variable, i do get the correct information for that specific list
This issue is only encountered when trying to get the items of this specific list.
What could cause this?
Thank you for the quick reply.
Yes I am retrieving the details in the locals panel:
The list is currently containing 2 items for testing, so that should not be an issue.
I am actually not 100% sure that our service account has complete access to the list, but if the access was limited, i should not be able to get any details at all?
Yes we saw a bug with the activity when all the columns are not having data…try adding a dummy row filling all the columns…that way we can confirm what the issue is
But the error itself looks strange…can you confirm is this the behaviour with all list?
I have tried adding a dummy row containing data in all colums, but this did not solve the issue.
I even tried using the oFilter to limit the for each list item to only handle the item which has data in all colums. I still get the same error.
We are using sharepoint term store for some of the colums, could this be causing the issue?
I can only confirm that the behavior is observed with this specific list - we do however use sharepoint lists actively, so i think if it fails in this list, it might also fail in others?
Do you know if there will be a fix for the bug in the Office 365 activity?
We are currently using sharepoint activities and as of now it fails only when columns are empty…in other situations we did not observe any such behaviour.
If you have any custom columns may be that might be an issue…not sure though…
We are using strings, choices and long text and numbers and found no issues…can check by creating a dummy list with only few columns with single line text and check if the behavious is same still
Hi I have created a dummy list only containing columns with single line text, and this works as inteded.
As soon as i add a column using managed metadata, the error will reappear.
So it seems that using columns with managed metadata is the root of the issue - causing the UiPath activity to fail. I can easily access this data using power automate, so i dont think that this is a limitation of the microsoft API, but a bug in the UiPath activity.
We are using managed metadata across our organisation, so at some point we will need to access other sharpoint lists with managed metadata. Do you know if a solution to this is possible?
As of now there is a limitation on UiPath microsoft activities with metadata columns…you can try with custom sharepoint activities from market place but again the are available only on legacy as of now…(might gwt upgraded as wll as there are internally developed by UiPath members)(but yea already you tried these activities and moved on i believe)
For an alternate way…may be you can trigger a power automate to update the list or need to use custom code to modify using the graph api calls