Putting IF field in table?

E

Ed

I've done IFs in macros, but never in a document! Now I need to add an IF
field in a table row. It takes the form of:
IF (ThisPage of TotalSectionPages) = 1, THEN ""
ELSE IF (ThisPage of TotalSectionPages) < TotalSectionPages THEN "continued"
ELSE "concluded"

I'm totally lost! I don't know how to format this for a document, AND I
can't find what to use for the field codes. A drop-kick in the right
direction would be greatly appreciated. (Suzanne Barnhill and I tossed this
around briefly a few months ago, but it was only "a nice idea" at the time.)

Ed
 
G

Greg Maxey

Ed,

Try { IF {PAGE} = "1"""{IF {PAGE}={SECTIONPAGES}"Concluded"Continued"}}

{ } are entered with CTRL+F9
 
M

macropod

Hi Greg,

Nearly! Try:
{IF{PAGE}= "1" "" {IF{PAGE}= {SECTIONPAGES} "Concluded" "Continued"}}

Cheers
 
E

Ed

Thank you both! It works great - except I had to make it
"Continued""Concluded" or it came up with the wrong answer?!? Did I do
something wrong? It looks just like you gave me except the last two items.

Ed
 
E

Ed

Never mind the previous confusion! I found the problem when I went to the
last page and it gave me ' instead of "concluded". I had apparently bobbled
the quote key to produce '" , and it was reading ' as the TRUE value. Fixed
that, swapped the words back around, and all is well!

Thanks again.
Ed
 
G

Greg Maxey

Ed,

As you have learned, typing these convoluted fields can be
tricky. What is even more frustrating is trying to
reproduce what you create as plain text in postings. Case
in point my missing the " in my post to you.

Thanks again macropod and thank you Ed for the feedback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top