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

Question

Question

Building tokens from multi-value field - if only one value, returns it multiple times.

asked on September 25, 2017

I am filling a PDF from fields. I'm generating three tokens from a multi-value field, which works fine if their are three values in the field, however, if only one value is present in that field, the first value is being applied to all three tokens. I need the second and third to be blank.

Images attached. 

2017-09-25 08_48_38-Workflow Designer.png
0 0

Replies

replied on September 25, 2017

Would any other value be acceptable if it is supposed to be blank?  After the assign token values activity, would it work to loop through the values and "if value is empty" put in the word 'blank' or put in a space or something?

0 0
replied on September 25, 2017

Thanks, Jennifer,

I have done something like this as a work around, that is working.

I created a new token that is set with a function of the count number of Charge_all field, then I'm using that to select a branch in a conditional decision based on that value, where I reset the values to null, if needed.

At this point, I guess I just want to know why it is not honoring the the fact those should be returning a blank. My work around is a lot of trouble to go through in order to correct  a value of something that should already be set.

0 0
replied on September 25, 2017

By design, indexing a token past its last value returns the last value. Normally, you would be able to just use the "table" feature in Fill PDF Form to set a multi-value token into a multi-value field in a PDF. The problem here is that you're build a multi-value token by combining 2 multi-value tokens together.

A workflow like the one below would work to create the token with the proper values. It figures out how many values are in each input token and then uses blanks when indexing past the last one.

Let me know whether the summaries of the activities are enough or a bit more explanation is needed. My sample uses "One and "Two" for the names of the input tokens to make it easier to test, but they can be multi-value tokens provided by other activities as well.

0 0
replied on September 25, 2017

Thanks for responding Miruna.

Here's what I did. It seems to be working. If I run into problems with it, I'll spend some time researching your solution.

2017-09-25 16_00_42-Workflow Designer.png
0 0
replied on September 25, 2017

It's basically the same thing, but built for the more generic case.

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

Sign in to reply to this post.