On Thursday, March 31, 2016 at 3:28:15 PM UTC-4, Dave S wrote: > > > > On Thursday, March 31, 2016 at 8:28:30 AM UTC-7, drew Roberts wrote: >> >> On Monday, March 21, 2016 at 9:53:36 PM UTC-4, drew Roberts wrote: >> >>> I have something like this in a controller: >>> >>> [...] >>> >> If I put something in the cur_camp field and submit, all rows "selected" >>> are updated with this new value. >>> >>> Selected is either every row or every row remaining when something is >>> searched for. >>> >>> Basically, I want to be able to do mass edits for certain fields of >>> selected records. (If the field is left blank, I want to leave that column >>> as is on the rows. >>> >>> Has anyone ever done something like this in web2py? Any hints? >>> >> >> OK, I have a dirty and non general solution in case anyone is interested >> in this problem: >> [...] >> > > Would using a spread-sheet like interface help? HandsOnTables seems to be > a popular one. Massimo likes it: > <URL:https://groups.google.com/d/msg/web2py/eN7IFn5l7aQ/TDqCutT8XUwJ> >
Hi Dave, thanks for the reply. It might be possible to do it in a spreadsheet like interface but I feel it would be sub-optimal because: I want the same form value to update the corresponding field in all chosen rows of the table. I have something produced that works for me in this particular instance but it seems "dirty" and non-general. I am attaching a screenshot of something that is working in hopes that it will make what I am trying to do clearer. Currently the Current Campaign for all selected Machines is NassauConchSalad and the Next Campaign for all selected Machines varies. In the changes form, we have selected FreeportFantasy as the Current Campaign and NassauConchSaladTwo as the Next Campaign. On clicking the Submit button, the Current Campaign for all selected Machines will be set to FreeportFantasy and the Next Campaign for all selected Machines will be set to NassauConchSaladTwo. If we had chosen to leave the Cur Camp or the Next Camp in the Changes form blank (None) then the matching field in the Selected Machines would have remained untouched during the update. > /dps > > all the best, drew -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

