Today I wanted to update a list item’s related Items (I renamed the Related Items to Secured Comments in my list)  field.

I’m using the Update List Item action and then in the set this value followed the following format: [{“ItemId”:13,”WebId”:”b95aa3f5-5fc2-4df7-b690-7381971e8ab7″,”ListId”:”7fb76569-48d5-45a6-9224-116ee234c304″}]

Ok so that’s great but what about multiple related items.

The following simply works:

[{“ItemId”:13,”WebId”:”b95aa3f5-5fc2-4df7-b690-7381971e8ab7″,”ListId”:”7fb76569-48d5-45a6-9224-116ee234c304″},{“ItemId”:14,”WebId”:”b95aa3f5-5fc2-4df7-b690-7381971e8ab7″,”ListId”:”7fb76569-48d5-45a6-9224-116ee234c304″}]

So now all that needs to be done is replace the variable bits with workflow variable and all will work.

Advertisements