[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] database lookup from form variable
> -----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 '']
If you just want to see if the field isn't empty (i.e passing an value via a
search page), this should work:
[search-region]
[search-list]
[if-item-data products sku]
sku not empty
[else]
sku is empty
[/else]
[/if]
[/search-list]
[/search-region]
HTH,
Matt