Page 1 of 1

Text With Variables Disappear in Action List

Posted: Fri Oct 27, 2023 5:41 pm
by bpletka
I need a page number out of the Job Name. I produce private data with string splitter. It is Split.Page3. I need this data twice as a variable to insert a blank page. I create a second private data called PageCount. I go to the action list to insert a blank page. I need it to insert every PageCount and start from Split.Page3. When I choose my variable for the fist item the are both available. I choose one then head to the second to choose the other variable. The other variable does not appear when I attempt to choose the second item. I am confused. I have included screen captures.

Re: Text With Variables Disappear in Action List

Posted: Mon Oct 30, 2023 11:18 am
by freddyp
You do not specify on which field you are clicking when you do not see the variables, but the most logical explanation lies in the mismatch between the type of the variable and the type expected by the field. The type of a variable can be Number, Length, Text, Boolean. A field expects a certain type of variable and only shows the variables from your variable set of the type it expects.

Re: Text With Variables Disappear in Action List

Posted: Mon Oct 30, 2023 11:56 pm
by bpletka
It is the "pages starting from page" field. When I select that field then the variables are not available as if they can only be used once. I understand what you are stating. How do I determine what the variable type should be?

Re: Text With Variables Disappear in Action List

Posted: Tue Oct 31, 2023 9:42 am
by bens
This looks like a bug: that field appears to only accept _text_ variables, while it should accept _number_ variables. Please report this to Enfocus support.

As a workaround, you can change your variable to type "text" for now.

Re: Text With Variables Disappear in Action List

Posted: Tue Oct 31, 2023 10:34 am
by freddyp
The type of a field can normally be determined by logic: an offset is of course a Length, a checkbox is of course a Boolean, etc.

What is the type of a page number in PDF? The first logical reaction is to think it is a Number, but that is debatable because in a PDF pages can also have names. The first page of a PDF is not necessarily page 1, it can be page 42 or xlii. In other words, Text is a reasonable and better choice for that.

So, in the option of "Add pages" that reads:

After every [field1] pages starting from page [field2] to [field3]

[field1] is clearly a Number, but [field2] and [field3] are Text. It is somewhat counterintuitive, but I hope you can live with that now you know why. How do you solve it? Add two variables of the type Text that have the same values as the other variables.

Re: Text With Variables Disappear in Action List

Posted: Tue Oct 31, 2023 6:53 pm
by bpletka
I changed the other item to text and not a number. That did show in the variable fields to be used. I tested this "simple" process and it did work!!!
I have one number and one text. Thank you all for your input and guidance. I do believe this may be an oversight or bug with Switch.