Topic Options
#56984 - 05/02/19 11:26 AM Writing IF Statements in PlanetPress 7
Damita Offline
OL Newbie

Registered: 10/28/15
Posts: 7
Loc: Georgia
I am trying to write an IF statement that requires a string to be placed in a box within the document and I am having an issue doing this in PlanetPress 7...basically understanding how to do it.

Here is what I would like to write:

IF line 97 is X put in box 55 BUT if line 97 is EMPTY put an X in box 22
_________________________
Damita Knuckles

Top
#56985 - 05/02/19 11:39 AM Re: Writing IF Statements in PlanetPress 7 [Re: Damita]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 474
Loc: Québec, Canada
So you are writing X in boxes as to emulate check boxes...right?

I would suggest that you add as many X as you have boxes and already position them over their corresponding boxes.

Then simply create a condition for each and apply proper logic for each. There is no need at this point to involve PressTalk unless your condition become more complex.

You could start by looking at the documentation on conditions.

Then simply apply the condition on the Text Object that holds the X

To do so, double-click on your Text object and select the Basic Attributes on the left side of the dialog. You will see a Condition field at the bottom. There you can select the condition relating to this Text object.

Top
#56986 - 05/02/19 12:10 PM Re: Writing IF Statements in PlanetPress 7 [Re: Damita]
Damita Offline
OL Newbie

Registered: 10/28/15
Posts: 7
Loc: Georgia
I did create a condition based on the line within the data that folds the string "X" and it isn't working.

I have a condition 97 if there is an X (string) in 97 true put it doesn't show in the box. What I'm been trying to do is get my condition to work on the text boxes I created. IF X is in the data put in the box assigned if not put in another box.

I guess I am just not understanding the condition function or I'm reading to deep.
_________________________
Damita Knuckles

Top
#56987 - 05/02/19 12:14 PM Re: Writing IF Statements in PlanetPress 7 [Re: Damita]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 474
Loc: Québec, Canada
Where is the X 97?

What are you looking for in your data and where "exactly"?

Top
#56988 - 05/02/19 12:27 PM Re: Writing IF Statements in PlanetPress 7 [Re: Damita]
jouberto Offline
OL Toddler

Registered: 04/18/18
Posts: 32
Hi Damita,

Depending on how many of these you will need to produce, it might be viable to use global conditions, but if too many need to be evaluated, you might be better to use a small presstalk script to initialize the detection of these X. If using global conditions (one for each box), simply find a sample record that has a X where you need, and drag-n-drop that X from the data pane to the global conditions section in the document structure. That will create a condition that is true when the X is found there and false when there is no X.

Then create your box by itself on your page, then create a text object with only the X, and position it over the corresponding box. Apply the global condition of the X found, on that text object only. Repeat this process for all boxes.

If you still struggle with this approach after trying it, please feel free to open a support ticket so we can better assist you. Thanks.

Regards,

Top
#56989 - 05/02/19 01:25 PM Re: Writing IF Statements in PlanetPress 7 [Re: Damita]
Damita Offline
OL Newbie

Registered: 10/28/15
Posts: 7
Loc: Georgia
I did get condition to work if there is something on line 97 for the condition. Now I added this if the condition is not true - =NOT(&Field_97_True) and result is true, but I couldn't figure out how to get the condition to place an X if it is empty.

Am I explaining this properly?
_________________________
Damita Knuckles

Top