Using IF and OR

B

Brenda A. Reid

I have a template that askes this question:

{ set restrictions { FILLIN "Are there any restrictions on objects? [ y /
n ]" \* MERGEFORMAT }}


Because of the fillin field answer being case sensitive, I'd like to be able
to simplify my coding. Would like to be able to say something like this:

{ if restrictions = n OR N "There are no restrictions on the objects and
powers of the Company." "Restrictions on the objects and powers of the
Company are as set forth in Schedule "A" hereto." \* MERGEFORMAT }



How would I do it if it's at all possible? Also, how would I use quotes
within quotes, i.e. Schedule "A" in the second part of the response?



Tks . . .
 
P

Peter Jamieson

In this case the simplest thing is something like

{ IF "{ REF restrictions \*Upper }" = "N" "There are no...."
"Restrictions..." }

For the double quotes within the IF result text, there are a few options,
e.g.
a. use two single quotes
b. use { QUOTE \" }
c. use { SET q { QUOTE \" } } at the beginning of your document and { q }
(or { REF q }) when you need a "

(make sure each pair of {} are the special field braces you can insert using
ctrl-F9).
 
B

Brenda A. Reid

Worked great -- ever so greatful . . .
Brenda

Peter Jamieson said:
In this case the simplest thing is something like

{ IF "{ REF restrictions \*Upper }" = "N" "There are no...."
"Restrictions..." }

For the double quotes within the IF result text, there are a few options,
e.g.
a. use two single quotes
b. use { QUOTE \" }
c. use { SET q { QUOTE \" } } at the beginning of your document and { q }
(or { REF q }) when you need a "

(make sure each pair of {} are the special field braces you can insert
using ctrl-F9).

--
Peter Jamieson
http://tips.pjmsn.me.uk

Brenda A. Reid said:
I have a template that askes this question:

{ set restrictions { FILLIN "Are there any restrictions on objects? [ y
/ n ]" \* MERGEFORMAT }}


Because of the fillin field answer being case sensitive, I'd like to be
able to simplify my coding. Would like to be able to say something like
this:

{ if restrictions = n OR N "There are no restrictions on the objects and
powers of the Company." "Restrictions on the objects and powers of the
Company are as set forth in Schedule "A" hereto." \* MERGEFORMAT }



How would I do it if it's at all possible? Also, how would I use quotes
within quotes, i.e. Schedule "A" in the second part of the response?



Tks . . .
 

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