You are viewing limited content. For full access, please sign in.

Question

Question

Workflow multivalue token indexing behaves strangely when index location is greater than token size

asked on July 7, 2020

If you have a multi-value token named %(Fruits) with:

  • Apple
  • Orange
  • Banana

 

Then when you iterate over the token with indexes:

  • %(Fruits#[1]#) = Apple
  • %(Fruits#[2]#) = Orange
  • %(Fruits#[3]#) = Banana
  • %(Fruits#[4]#) = Banana
  • %(Fruits#[5]#) = Banana

 

I don't understand why indexes 4 and 5 would not just return a blank value and/or raise an exception. Is there a way around this?

2 0

Replies

replied on July 8, 2020

I asked this a long time ago and the response was don't do that. Iterate them with a loop/for each. Or, if trying to fill in PDF forms, use the pattern matching option.

I 100% agree with you this should be seen as a bug.

1 0
replied on July 8, 2020 Show version history

For my use case, I can't use a loop. I ended up with a conditional branch with a billion branches where each one checks the size of the token before proceeding. It's ridiculous and dirty, but it works... frown

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.