Created nested IFs in a Form

M

Matt M

I am trying to create a form with a nested IF statement.
I am creating a performance appraisal form, so what I need
the nested IF for is to translate the numerical score that
the user enters into the text translation.

Example
"1" = Does not deliver
"2" = Achieved

etc., etc.

I found an article on nested IFs for mail merge which
suggested the following format:

{IF test1 "TrueResult" "{IF
test2 "TrueResult" "FalseResult"}"}

however this is not working. Anyone have experience
creating somethin like this?
 
M

macropod

Hi Matt,

You need to test the truth of your 'test' conditions, like:

{SET test1 0}{SET test2 0}{IF{=test1}= 1 "TrueResult1" {IF{=test2}= 1
"TrueResult2" "FalseResult"}}
Here I've used SET statements for demo purposes, toggle them from 0 to 1 to
see what happens.

Cheers
 
C

Cindy M -WordMVP-

Hi Matt,

You're very close, but you're not actually testing the value
of your condition - you're missing an = .

Assuming Test1 is the name of a form field, the field would
look more like:

{ If test1 = 1 "True for 1" "{ If test1 = 2 "True for 2"
"False for both"}" }

As it stands, above, Word will do it's best to do a numerical
comparison. If you need to force a string comparison, both
sides of the equation should also be placed in quotes. In
this particular case, it shouldn't matter, though...
I am trying to create a form with a nested IF statement.
I am creating a performance appraisal form, so what I need
the nested IF for is to translate the numerical score that
the user enters into the text translation.

Example
"1" = Does not deliver
"2" = Achieved

etc., etc.

I found an article on nested IFs for mail merge which
suggested the following format:

{IF test1 "TrueResult" "{IF
test2 "TrueResult" "FalseResult"}"}

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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