Hi ,
In Web2 py tool
need sample code to update db table(module) from View value to --->
Controller code for updating:
View code
:
ajax('{{=URL('update_data')}}',['org_id','solution_id','activity_id','effort'],'target');
Controller code:
def update_data():
for u in request.vars.or
In the controller, is your code entering the `if` checks? And am
guessing the totalrecords is initialized before you do a
`totalrecords=totalrecords+1`?
Noticed that you are using `update_record` and `update` in your code. Do
take a look at this:
http://web2py.com/books/default/chapter/29/06/th
Yes totalrecords decalred.
Updated the code like below in controller: But still throwing issue
Controller code:
@auth.requires_login()
def update_timesheet():
totalrecords=0;
rows = db((db.ActivityMapping.org_id==db.Organization.id)&
(db.ActivityMapping.resource_id==db.auth_user.id)
On Wednesday, August 10, 2016 at 3:52:20 AM UTC-7, madhu nomula wrote:
>
> Yes totalrecords decalred.
>
> Updated the code like below in controller: But still throwing issue
>
>
What issue is thrown? Do you get a ticket, or wrong results?
/dps
--
Resources:
- http://web2py.com
- http://w
I am unable to update .
In view its throwing issue: only row.update_record() code throwing
error. unable to capture in view
Please let me know if there is any issue below code:
def update_timesheet():
totalrecords=0;
i=0;
rows = db(
(db.ActivityMapping.resource_id==db.auth_use
Doesn’t update_records belong to *row* instead of *rows*?
On Thu, Aug 11, 2016 at 2:10 PM, madhu nomula wrote:
> I am unable to update .
>
> In view its throwing issue: only row.update_record() code throwing
> error. unable to capture in view
>
> Please let me know if there is any issue below co
From the documentation (link I provided earlier): "The update_record
method is available only if the *table's id field is included in the
select*, and cacheable is not set to True."
Your select does not include the table's id field. In your case, that
would be `db.ActivityMapping.id` ... I guess
7 matches
Mail list logo