Interchange Developer Resource


[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

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


Search for: Match: Format: Sort by: