IF field code problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I'm trying to do this, which isn't working out as expected (formatted for
readability):

{
IF { AUTOTEXT AStudentYearLevel } = "0"
"Prep"
{ AUTOTEXT AStudentYearLevel }
}

{ AUTOTEXT AStudentYearLevel } by itself works, and prints a number between
0 and 10, 0 = Prep, 1 = Grade 1, etc. I just need to get rid of the 0, as
"Grade 0" doesn't exactly sound right.

I hope I make sense.
Thanks.
 
Try

{ IF { ={ AUTOTEXT AStudentYearLevel } + 0 } = 0 "Prep" { AUTOTEXT
AStudentYearLevel } }


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
Plan B

{Autotext AStudentYearLevel \# "#;;"}

should get rid of the 0 but display any other number

However

{ IF{Autotext AStudentYearLevel} <> 0 "{Autotext AStudentYearLevel}" "Prep"}

works here.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
The major problem with all this, is that I didn't know you had to double
insert the field braces specially, rather than tying them in.

I'd used insert for the IF, but not for the AUTOTEXT. It's all working now,
thank God.

Thank you all.
 
You can enter the field braces with CTRL+F9

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top