Re: [web2py] Re: web2py dynamic queries

2019-06-17 Thread Jim Steil
I think you need to check the web2py errors that are being generated. That should tell you what is going on. Jim On Mon, Jun 17, 2019, 5:04 PM Cristina Sig wrote: > I'm having the same datatables warning: ajax error so I guess it might be > the referenced field that is causing the error becaus

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Cristina Sig
I'm having the same datatables warning: ajax error so I guess it might be the referenced field that is causing the error because even the table is not being field with data. El lunes, 17 de junio de 2019, 18:55:02 (UTC-3), Jim S escribió: > > Are you getting an error on the referenced field (Nat

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Jim S
Are you getting an error on the referenced field (Nationality) or is it just not returning the results you're expecting? -Jim On Monday, June 17, 2019 at 4:46:14 PM UTC-5, Cristina Sig wrote: > > thanks! > I solved the integer field but it seems that the referenced fields are not > working. > I

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Cristina Sig
thanks! I solved the integer field but it seems that the referenced fields are not working. I will try to see what is the issue with them El lunes, 17 de junio de 2019, 18:05:18 (UTC-3), Jim S escribió: > > I'm guessing it's the phone number field. You can't use 'contains' on a > numeric field

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Jim S
I'm guessing it's the phone number field. You can't use 'contains' on a numeric field. So, try this: if search_value and search_value != '' and search_value != 0: try: int_search_value = int(search_value) queries.append((db.Student.firstname.contains(search_value)) |

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Cristina Sig
Hello Jim, I tried the code and it shows me an error *DataTables warning: table id=tableStudent - Ajax error. For more information about this error, please see http://datatables.net/tn/7* I think it is not recognising the numeric field or the referenced ones El lunes, 17 de junio de 2019, 11:

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Jim S
Cristina I'd look at adding a 'left' argument on my query.select(). if search_value and search_value != '' and search_value != 0: queries.append((db.Student.firstname.contains(search_value)) | (db.Student.lastname.contains(search_value)) | (db.Student.ph

RE: [web2py] web2py dynamic queries

2019-06-17 Thread John Bannister
Subject: [web2py] web2py dynamic queries Hello, I'm a newbie on python language so I'm struggling to do some queries. I have a table Student which I use to fill a table on view, above that table, I have a search box, where I would like to provide the option to search in multip

[web2py] web2py dynamic queries

2019-06-16 Thread Cristina Sig
Hello, I'm a newbie on python language so I'm struggling to do some queries. I have a table Student which I use to fill a table on view, above that table, I have a search box, where I would like to provide the option to search in multiple columns (phone, last name, first name, or nationality). I

[web2py] dynamic queries

2012-07-28 Thread dave
I have something like qset=db() if arg1 == "xyz": qset=qset(db.abc.id > 0) if arg2 == "abc": qset=qset(db.abc.age > 5) returned = qset.select() return SQLFORM.grid(returned) qset.select returns all the rows with all the columns I think, I know that SQLFORM.grid accepts a t