[ic] Help with the [if value ...] tag

Ed LaFrance edl@newmediaems.com
Mon, 13 Nov 2000 11:21:18 -0800


Karen -

The [value] type is for "in-memory" access, like [if value country eq 'US'] 
to get country setting for the current session.  To get field content from 
a database, used the [data type:

[if type=data term="products::addl_category::[item-code]" op=eq 
compare="accessories"]
...
[/if]

-Ed L>

At 07:37 PM 11/13/00 +0100, you wrote:
>"Arango, Karen" wrote:
> >
> > I am having a bit of difficulty with what I thought was a straight forward
> > tag.
> >
> > I would like to display different html based on the value of the
> > addl_category field within my products table.  I am using the following 
> code
> >
> >             [if value [item-field addl_category] eq "accessories"]
> >               <font face="verdana" size="2" color=white><B>Phone for the
> > [item-description]</B></font>
> >             [else]
> >               <font face="verdana" size="2" color=white><B>Related 
> Items for
> > the [item-description]</B></font>
> >             [/else]
> >             [/if]
> >
> > and I am always getting dumped into the else clause.  I did a display 
> of the
> > [item-field addl_category]  value in the line before, and it is
> > "accessories".  Any ideas on where I have gone wrong?
> >
> > Thanks for the help,
> >
> > Karen
> >
>[DEL]
>
>TIP:
>If any is going wrong, use the scratch variable like
>
>[seti dummy][item-field addl_category][/seti]
>TEST: [scratch dummy]<BR><BR>
>
>and then, try
>
>[if scratch dummy =~ /accessories/]
><font face="verdana" size="2" color=white><B>Phone for the
>[item-description]</B></font>
>[else]
><font face="verdana" size="2" color=white><B>Related Items for the
>[item-description]</B></font>
>[/else]
>[/if]
>
>Joachim
>
>--
>-------------Hans-Joachim Leidinger---------------------
>
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@www.minivend.com
>http://www.minivend.com/mailman/listinfo/interchange-users

 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          edl@newmediaems.com
Placerville, CA  95667         http://www.newmediaems.com
(530) 622-9421                 (866) 519-4680 Toll-Free
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>