[ic] database lookup from form variable

Mike Heins interchange-users@icdevgroup.org
Thu Jun 13 23:25:01 2002


Quoting Matthew T. Snyder (snydermt@ariontech.com):
> 
> 
> > -----Original Message-----
> > From: interchange-users-admin@icdevgroup.org
> > [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of Michael
> > Goldfarb
> > Sent: Thursday, June 13, 2002 10:10 PM
> > To: interchange-users@interchange.redhat.com
> > Subject: [ic] database lookup from form variable
> >
> >
> > IC 4.8.5
> >
> > I must be a complete moron (or more likely have a syntax error), but I am
> > trying to do a simple if/else statement to test to see if a
> > certain item is
> > in a catalog when a user enters its SKU number into a form field.
> >
> > Here is the code I have tried:
> >
> > [if data products::sku::"[value sku_test]"]
> > It is available
> > [else]
> > It is not available
> > [/else]
> > [/if]
> >
> > I can print [value sku_test] correctly on the following page both
> > above and
> > below the "if" statement so I know it is correct, but no matter
> > what syntax
> > I try I cannot get this to work.
> >
> > Sometimes it's the easiest things...
> >
> If you want to check for a particular value, try:
> 
> [if data products::sku::[value sku_test] ne '']

Nope. Can't work.

  [if type=data term="products::sku::[value sku_test]"]
	
That can work. This is all covered in the docs.

    http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=ictags03%2e01



-- 
Mike Heins
Perusion -- Expert Interchange Consulting
phone +1.513.523.7621      <mike@perusion.com>

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman