We can add to a metadata list using WF, sure. Has anyone found a way to remove all or some values from a list?
Thanks in advance!
Question
Question
WF delete from list value
Replies
Hi Chris,
How about using Assign Token Values activity? Modify the existing list token, choose Replace existing values, and then choose the Token Dialog
Then select the token, choose Apply Function, to select a function
Use the Remove At function, and specify the index you want to remove. The index could be specified with a token.
If you want to remove multiple values from the list, you could insert multiple Remove At functions. Here you need to remove the items reversely, like delete 5th value first, and then 3rd value, finally 1st value, which is similar to the following.
If you want to remove the values that matching the specified text from the multi-value token, please try the function Remove.
This is great for using with tokens. Thank you for putting this all together. I am looking for something that can remove values from the field in the repository metadata. Not just a token value. Something that is the opposite of the 'Append List Field Choices' activity. Does that help?
Currently WF does not have a way to retrieve the list. You could try to use SDK script to work with list definition for the template field.