Hi Lucas I can't figure out how to help. I mean we have a 'harry' field and now we have a 'party' variable. It just seems too confusing.
When I get a situation like this I try to simplify things so they are working and then try to work forward testing each step. Best wishes, D On Monday, 24 June 2013 00:03:34 UTC+1, lucas wrote: > > ok, still trying new ideas. this time i stored the prtype in a session >> variable then did an onvalid function to pass the session.party value into >> gform.vars.party, or: > > > def worksheet2b(): > cidi = args_to_int(0) > sidi = args_to_int(1) > gidi = mcp.request_to_int(request.vars.pr) > prtype = "DEFAULT" > if (request.vars.pr == "a"): > prtype = "VALUE1" > elif (request.vars.pr == "b"): > prtype = "VALUE2" > session.party = prtype > if cidi and sidi: > tCase = db.cases > tSheet = db.case_worksheets > tGross = db.sheet_gross_adjustments > sCase = db(tCase.id==cidi).select().first() > sSheet = db(tSheet.id==sidi).select().first() > gform = SQLFORM(tGross, record=gidi) > gform.vars.case_id = sCase.id > gform.vars.case_worksheet_id = sSheet.id > gform.vars.party = prtype > if gform.process(onvalidation=chk_quick).accepted: > session.flash = "Gross Adjustments Updated" > redirect(URL(f="worksheet2a", args=[sCase.id,sSheet.id])) > elif gform.errors: > response.flash = "Gross Adjustment Errors" > return dict(prtype=prtype, sCase=sCase, sSheet=sSheet, gform=gform) > > def chk_quick(f): > fv = f.vars > fv.party = session.party > return f > > > -- --- 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/groups/opt_out.

