Easier: just delete them all for that item, and write back the ones that ARE checked.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Shelley Sent: Tuesday, December 03, 2002 3:42 PM To: Multiple recipients of list witango-talk Subject: RE: RE: Witango-Talk: updating multiple records Unchecks aren't that hard. Make a group of hidden input fields called unCheckList with the id of all the records in the resultset, and a group of checkboxes called checkedList, also with the id's. <@rows> <input type=hidden name="unCheckList" value=yourIDColumn> <input type=hidden name="checkedList" value=yourIDColumn> </@rows> Then create an array of all the id's in the unCheckedList that are not in the checkedList. <@assign local$unCheckArray <@arg unCheckList type=array>> <@assign local$checkedArray <@arg checkedList type=array>> <@assign local$unCheckList <@filter array=local$unCheckArray expr="!(@@checkedList contains #1)">> Then use the unCheckList array with an IS IN operator on your update action. You'll need to check for empty arrays, because Tango still chokes on those. Dave Shelley [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Wilcox, Jamileh Sent: Tuesday, December 03, 2002 2:39 PM To: Multiple recipients of list witango-talk Subject: RE: RE: Witango-Talk: updating multiple records I've been doing it the other way and just figured this one out (hence my email yesterday). Pretty cool! So, speaking of un-checks...got any suggestions? I'll be trying to set up some of those later this afternoon. Thanks. j > -----Original Message----- > From: Simon Boddy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 8:53 AM > To: Multiple recipients of list witango-talk > Subject: RE: Witango-Talk: updating multiple records > > > Hi Rick, > > There is no need to loop to achieve this. You should give all > your checkboxes the same name, say myBoxes, then set the > value attribute of each checkbox to the database id of the > corresponding record. You can then use <@arg myBoxes > type="array"> to retrieve an array of database ids of checked boxes. > > So just drag on an update action. In the top pane drag on > your id column, select the 'is in' operator, then type <@arg > myBoxes type="array">. In the update with values pane, just > set your flag column. Use <@numaffected> in the results to > satisy your curiosity that all records are being updated. > > The fun starts when you want to process un-checks. > > Good luck. Simon > -- > _______________________________________________ > Get your free email from http://www.graffiti.net > > Powered by Outblaze > ______________________________________________________________ > __________ > TO UNSUBSCRIBE: send a plain text/US ASCII email to > [EMAIL PROTECTED] > with unsubscribe witango-talk in the message body > ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body