[ic] [if type=date term=HELP]

Scott Andreas---Learning Services, Inc interchange-users@interchange.redhat.com
Thu Dec 27 17:51:00 2001


That worked!!

tweeked it a little however

[seti tmp_var] [data base="contacts" field="updated" key="[item-code]"]
[/seti]
[if scratch tmp_var == 1]
<IMG src="newcon.gif" ALT="this is a new contact">
[/if]

IOU a BREWSKI

THANKS A BAZILLION :-)

Scott

-----Original Message-----
From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of
Marty Tennison
Sent: Thursday, December 27, 2001 1:35 PM
To: interchange-users@interchange.redhat.com
Subject: RE: [ic] [if type=date term=HELP]


>
> There should be a simple solution is all I want is to evaluate the result
> and if the column has a value of 1 in it then display the graphic else
> display nothing. The other problem is that the column could contain a NULL
> record so evaluating if the record is NULL would not work.
>
The simple solution is to ensure that the field can only contain a 0 or 1 by
setting your database field to not allow nulls and default to either 0 or 1,
then you can do a simple check.
If you need other test done then create additional database fields as
needed.  A clunky work-around is this.

Set a scratch variable with the value of that field and then test the
variable to see if the value is contained within.

[seti tmp_var][data term="<TABLE>::<COLUMN/FIELD>::<CODE/SKU>"][/seti]

[if scratch tmp_var =~ /1/]
	do this
[else]
	do this
[/else]
[/if]

This will also test true if tmp_var contains 10 or 11 or 21 etc...

_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users