On Monday, June 10, 2019 at 3:15:11 PM UTC-7, Quang Lam wrote: > > Hi Dave, could you please elaborate more since the book doesn't explain my > situation well. > Thanks >
Hmmm, does that "other script" run server-side or client-side? I forgot about that question. /dps > > On Monday, June 10, 2019 at 2:23:33 PM UTC-7, Dave S wrote: >> >> >> >> On Monday, June 10, 2019 at 1:04:41 PM UTC-7, Quang Lam wrote: >>> >>> i have this table as follows: >>> db.define_table( 'Pass', Field('FlightID', 'reference Flight', >>> label=T('Flight'), requires=IS_NOT_EMPTY()), >>> Field('AnalystID', 'reference Analyst', >>> label=T('Analyst'), requires=IS_NOT_EMPTY()), >>> Field('TypeID', 'reference Type', >>> label=T('Type'), requires=IS_NOT_EMPTY()), >>> Field('Name', >>> label=T('Pass Name'),requires=IS_NOT_EMPTY()), >>> Field('Configuration', >>> label=T('Configuration')), >>> Field('PostedToCustomer', >>> label=T('Posted To Customer'), type='boolean'), >>> Field('PassNote', >>> label=T('Pass Note'), type='text'), >>> Field('AnalysisNote', >>> label=T('Analysis Note'), type='text'), >>> Field('Mode', label=T('Mode'), >>> writable=False, type='text')) // field mode is set to >>> writable = false to prevent user inputting the data in this field because >>> it will call another script to get the the data for mode attribute >>> >>> i will have the form to ask the user to input info into these fields >>> except mode field because i will call another script to get the data of the >>> mode from the other table and input the mode data along with the input data >>> from user. my question is where should i call the script to get the mode >>> data? ( is it the in the form.process().accepted block. ?). how can i >>> insert the mode data at the same time when the user click submit to insert >>> the inputs into the table ? >>> >>> Please help, Thanks >>> >> >> Perhaps you want to use an after_update callback. >> <URL: >> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-record-insert-delete-and-update >> > >> >> /dps >> >> > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/71211214-e41f-40df-bf34-96e5e56846d2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.