[ic] table-editor tag and item_id with autonumber table

Peter peter at pajamian.dhs.org
Mon Nov 7 19:04:41 EST 2005

On 11/07/2005 01:38 PM, JT Justman wrote:
> I can create a new entry on an autonumber column with:
> [table-editor key="" table="site_content"]
> The problem is that the "Items" group uses $CGI->{item_id} to track the
> current product sku, and if there is a value in $CGI->{item_id} then
> [table-editor] treats that as the code to edit, and we end up creating a
> row with the number of the current item sku when we thought we were
> autonumbering.

You should be able to force autonumbering with (untested and not sure):
[table-editor key="[counter products/site_content.autonumber]" 

You can also do: [cgi name=item_id set="" hide=1]

...or (even better because it actually removes the cgi value rather than 
just setting it to the empty string)...

[perl]delete $CGI->{item_id}; '';[/perl]

To manually clear out the item_id if it helps.


More information about the interchange-users mailing list