I'm using workflow 9.1 to generate a .csv report from repository metadata.
I was trying to cast a multi-value retrieved field("MyField_All") to a List<string>, then add the retrieved value to another multi value string token("MyToken").
I was doing something like this:
List<string> list = this.GetTokenValue("MyField_All") as List<string>; List<string> biggerlist = this.GetTokenValue("MyToken") as List<string>; foreach(string item in list){ biggerlist.add(item); } this.SetTokenValue("MyToken", biggerlist);
but seems a null value is saved into "MyToken" and seems I can't get the value out of "MyField_All".
What is the correct way of using a multi-value token/retrieved field like a list or array?
BTW, I'm currently using single-value token to store the result and use workflow "For Each Value" to iterate through the field. Which is just a walk around. Since string has a 2^31 length limitation, I can't just use one string to save all the data.