Something like: place: id place (string)
campaign id place_id (db.place) from (date) to (date) In smartgird, in oncreate for campaign, form.vars has fileds [id, from, to] only, but hasn't [place_id]. But I can find it as form.custom.inpval.place_id. I'm just curious if form.custom.inpval.place_id is the single and the proper place where to get the parent foreign key (in oncreate). Dne pondělí 16. května 2016 12:37:33 UTC+2 Mirek Zvolský napsal(a): > > Hi, > smartgrid oncreate receives single parameter: form > > I have in parent table the count of child records, > so when I add new child record in smartgrid, > I need to increase (+1) this count, > so I need obtain the parent record. > > But in oncreate in > form.vars > is the parent_id not present. > > I have found it in > form.custom.inpval.parent_id > and with this value all works fine. > > But .... is > form.custom.inpval.parent_id > really a good place where to take the parent_id ? > > > Thanks, > Mirek > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.