[ic] writing to a table

Grant interchange-users@icdevgroup.org
Wed Aug 28 15:59:00 2002


How can I write to a field in the products table in-page?  Is there any
reason not to do this?

My syntax must be way off in the following code.  I just wrote it to give
everyone an idea of how I'm trying to accomplish this.  I'm trying to search
for all "Posters", then set the "unavailable" field in the products table to
"1" for any items that have a "discontinued" value of "1" and an inventory
"quantity" equal to or less than "0".

I hope to have it set up something like this:

[search-region
search="co=yes/sf=category/se=Posters/op=eq/nu=0/sf=inactive/se=1/op=!=/nu=1
"]
[search-list]
[if-item-data type="products" term="discontinued" op="eq" compare="1"]
[if-item-data type="inventory" term="quantity" op="=<" compare="0"]
[set-item-data products unavailable]1[/set-item-data]
[/if-item-data]
[/if-item-data]
[/search-list]
[/search-region]

I'm using the default database in 4.8.6.  Thanks!

- Grant