Text With Variables Disappear in Action List

Post Reply
bpletka
Newbie
Posts: 10
Joined: Tue Sep 21, 2021 12:00 am

Text With Variables Disappear in Action List

Post 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.
Attachments
Action List for Blank Page
Action List for Blank Page
Blank Page Action List.jpg (67.08 KiB) Viewed 8071 times
2 Variables Available
2 Variables Available
Variable Select 2 PD.jpg (28.25 KiB) Viewed 8071 times
Second Variable disappears
Second Variable disappears
Action List No Variable.jpg (26.1 KiB) Viewed 8071 times
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Text With Variables Disappear in Action List

Post 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.
bpletka
Newbie
Posts: 10
Joined: Tue Sep 21, 2021 12:00 am

Re: Text With Variables Disappear in Action List

Post 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?
bens
Advanced member
Posts: 253
Joined: Thu Mar 03, 2011 10:13 am

Re: Text With Variables Disappear in Action List

Post 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.
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Text With Variables Disappear in Action List

Post 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.
bpletka
Newbie
Posts: 10
Joined: Tue Sep 21, 2021 12:00 am

Re: Text With Variables Disappear in Action List

Post 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.
Post Reply