I'm using CFGRID
and CFGRIDUPDATE
to insert values into a database. The problem is, each record needs to get an additional field that isn't in the grid. Is there any way to save that additional field to the record, or do I have to whip up an alternative to CFGRID?
Basically, I have a bunch of users I'm entering into a grid. The page is getting a category id. I want all of the users to be saved with that category id.
Another thing that would work is if I could get a list of all primary keys, including those for the just-created records, and update all of them with the category id. But it looks like CFGRIDUPDATE
doesn't return any information about the rows that were created.
There is another way. It involves handling directly the form variables which are posted by CFGRID. Here's some example code:
form.cfm:
then in post.cfm