Using Operators with Field Codes

B

Brenda A. Reid

I have a precedent which has:

{ set granteemf { fillin "Is the Grantee Male or Female? [type m or f]}}
{ set granteesp { fillin "Is the Grantee Singular or Plural [type s or p]}}

I would like to have an If statement combining the two, i.e.

If granteemf = f AND granteesp = s . . .

Can I do that?

Brenda
 
P

Peter Jamieson

The safest general-purpose way for multiple questions is

{ IF "{ granteemf \*Upper }" = "F" "{ IF "{ grannteesp \*Upper }" = "S"
"both F and S" "M or P" }" "M or P" }

But you could also consider something like

{ IF "{ granteemf \*Upper }&{ grannteesp \*Upper }" = "F&S" "both F and S"
"M or P" }

(You need something in the middle of the two results because

{ IF "{ granteemf \*Upper }{ grannteesp \*Upper }" = "FS" "both F and S" "M
or P" }

would result in "both F and S" if the user responded FS to either the M/F
question or the S/P question and left the other one blank)
 
B

Brenda A. Reid

This certainly did the trick. Am forever grateful . . . Thanks.
Brenda

Peter Jamieson said:
The safest general-purpose way for multiple questions is

{ IF "{ granteemf \*Upper }" = "F" "{ IF "{ grannteesp \*Upper }" = "S"
"both F and S" "M or P" }" "M or P" }

But you could also consider something like

{ IF "{ granteemf \*Upper }&{ grannteesp \*Upper }" = "F&S" "both F and S"
"M or P" }

(You need something in the middle of the two results because

{ IF "{ granteemf \*Upper }{ grannteesp \*Upper }" = "FS" "both F and S"
"M or P" }

would result in "both F and S" if the user responded FS to either the M/F
question or the S/P question and left the other one blank)

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

Brenda A. Reid said:
I have a precedent which has:

{ set granteemf { fillin "Is the Grantee Male or Female? [type m or f]}}
{ set granteesp { fillin "Is the Grantee Singular or Plural [type s or
p]}}

I would like to have an If statement combining the two, i.e.

If granteemf = f AND granteesp = s . . .

Can I do that?

Brenda
 

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