[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
FYI took your concept and changed it around a bit for anyone else that might have been trying. links = [lambda row: BUTTON('Profile',_onclick="ajax('%s', [], 'ab');" % URL('default', 'companypage.load', args=[row.id]), **{'_data-toggle': 'collapse', '_data-target' : '#ab', '_class' : 'accordion-

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
Thank you Anthony this is much better greatly appreciated. On Saturday, May 17, 2014 9:27:35 AM UTC-5, Anthony wrote: > > It's still not quite clear what's going on, but this approach seems > unnecessarily indirect (i.e., copying the row ID to an input field, and > then using the ajax function t

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread Anthony
It's still not quite clear what's going on, but this approach seems unnecessarily indirect (i.e., copying the row ID to an input field, and then using the ajax function to send that value to a function that returns a component, which then calls another function to produce a form). Instead, why

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
FYI Inside the new method i added i tried a=int(request.vars.id) to see if I could produce the same list error and it does as well. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
Thanks Massimo for shining light on the situation. After your reply i went ahead and tried b = int(a) and received an error. TypeError: int() argument must be a string or a number, not \'list\'\n' So after that I started fresh with a new database since the previous database had imported data. I

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread Massimo Di Pierro
I do not think the issue with your code. The issue with corrupted data in database. You seem to have an integer that contains list data. Perhaps one of your fields was a "list:integer" or "list:reference" type and then you changed it to "integer" or "reference" type. You ended up with corrupted

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
I deleted previous post stating it was working it's not im tired... On Friday, May 16, 2014 3:28:49 PM UTC-5, LaDarrius Stewart wrote: > > Omitted quite a bit Anthony but I feel I included the valuable > information. Considering minus the record value of the SQLFORM the > functionality works as

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
I fixed it im not sure why because I thought these two parameters were the same but i changed it from: form3=SQLFORM(db.Company,a,formstyle="bootstrap") To this: form3=SQLFORM(db.Company,record_id=a,formstyle="bootstrap") And its working fine... :( -- Resources: - http://web2py.com - http://

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
Omitted quite a bit Anthony but I feel I included the valuable information. Considering minus the record value of the SQLFORM the functionality works as intended. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:/

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
links = [lambda row: BUTTON('Profile',_onclick="jQuery('#id5').val('%s'); ajax('new', ['id'], 'ab');" % str(row.id), **{'_data-toggle': 'collapse', '_data-target' : '#ab', '_class' : 'two btn btn-success', '_type' : 'submit', '_value' : 'Submit', '_id' : 'ld'} )] # Companysearch method grid lin

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread Anthony
It might help if you can show more of the controller code and the view code so we can get a better idea of what's going on. On Friday, May 16, 2014 3:23:12 PM UTC-4, LaDarrius Stewart wrote: > > Yeah there is only that one. Also there our other lines using variable "a" > and they are acting fine

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
Yeah there is only that one. Also there our other lines using variable "a" and they are acting fine each time I click another button. Like "Company = db(db.Company.id==a).select().first()" so its not that the value is incorrect because everything else it works fine with. Its only with the SQLFO

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread Niphlod
are you aware that ajax('new' ['id'], 'ab') it takes all input with name = id and pass those as an argument ? On Friday, May 16, 2014 7:27:47 AM UTC+2, LaDarrius Stewart wrote: > > Im loading a component from a grid with a button you can see the code > below in grid "links=links". My issue is th