manually, users are invited to tell us what they know about other users' status (many have come and gone over time where no real effort has been made to update the info over the years :)
so the idea is, I have a jqgrid listing all users (+ those xtra fields in table p4users_all). then there is a link to open a form to update/ delete a user (not necessarily the logged on user) as well as a link to open a form to add one. The idea is that they use the "users" dropdown to choose who they update (if they update), then they manually update the fields Status & Licene as well as the comments field. So all is good, except, that choosing a user from the drop and making the changes to the fields seems to 'create' users as opposed to updating existing ones... Makes sense? Thanks for you help this! :) Mart On Sep 27, 11:56 am, Richard Vézina <ml.richard.vez...@gmail.com> wrote: > Would you update status manualy or automatically? > > Richard > > On Mon, Sep 27, 2010 at 11:12 AM, mart <msenecal...@gmail.com> wrote: > > Hi > > > so, I have this table: > > > db.define_table('p4users', > > SQLField('p4_user'),format='%(p4_user)s') > > > which gives me a nice dropdown :) > > > then I have this one, where I want to update the Status field. > > > db.define_table('p4users_all', > > SQLField('Name', db.auth_user, default=auth.user_id), > > # SQLField('User',db.p4users), > > SQLField('User_id',requires=IS_IN_DB(db,db.p4users.id,'% > > (p4_user)s')), > > SQLField('Status',db.p4Status), > > SQLField('License',db.license)) > > > in the controller, I have something like this (i know a little messy, > > but I am in a rush ... I have been grasping at this point ;) ) > > > def display_form(): > > # record = db.p4users_all(request.args(0)) > > row = db.p4users_all[request.args(0)] > > form = SQLFORM(db.p4users_all, row, deletable=True) > > form.vars.id = request.vars.id > > if form.accepts(request.vars, session): > > > response.flash = 'form accepted' > > elif form.errors: > > response.flash = 'form has errors' > > return dict(form=form) > > > Any help, would REALLY be appreciated! :) > > > Thahnnks, > > Mart :) > > > How do I make so it doesn't create a new record every time I want to > > update a user's status? > >