[web2py] SQLFORM.grid and user_signature - unexpected behavior

2021-05-10 Thread Tom Clerckx
I was running into some issue with SQLFORM.grid and after going through the code, I realized that the grid does not include request.vars when calculating the URL signature (ref: v2.21.1, gluon/sqlhtml.py @ 2440). Please correct me if I would be wrong,... else it may be useful to add

Re: [web2py] SQLform.grid request not sending bool valuis

2020-11-24 Thread Vid Ogris
Yes they are writable. V V sre., 25. nov. 2020 ob 04:31 je oseba AGRogers napisala: > Are the boolean fields writable? I think unwritable fields are excluded > from request.vars. > > ___ > *www.TenOutOfTen.org* > rogers...@gmail.com > (+95)

Re: [web2py] SQLform.grid request not sending bool valuis

2020-11-24 Thread AGRogers
Are the boolean fields writable? I think unwritable fields are excluded from request.vars. ___ *www.TenOutOfTen.org* rogers...@gmail.com (+95) 09 250018669 (Myanmar) On Tue, 24 Nov 2020 at 22:21, Yebach wrote: > Hello > > I have a

[web2py] SQLform.grid request not sending bool valuis

2020-11-24 Thread Yebach
Hello I have a SQLform.grid and when validating fields i have some issues so to come around i have if request.args and request.args[0] in ['edit', 'new']: if form.update_form: if form.update_form.accepts(request.vars): print request.vars

[web2py] SQLFORM.grid, best approach for searching in ID type field

2020-07-06 Thread Luciano Bovio
I am reading a table from another application just to perform searches. I am using SQLFORM.grid, my problem is that i need to search for 'product_code' field that in my DAL i have mapped as ID. I have no rights to write fields on remote DB. /models/remote_server.py

[web2py] SQLFORM.grid in ajax function with signed urls

2019-11-15 Thread cdbaron
Hello I have a component that is loaded by ajax and this component has an SQLFORM.grid. This component has a variable in the url. For security reasons I want the ajax component to have the url signed. The problem is that the grid pagination links generate a wrong signed url. wrong signed url:

[web2py] SQLFORM.grid search with fields readable = False

2019-10-26 Thread cdbaron
Hello, I have an SQLFROM.grid in which I render each of the lines with a special format using only the id field of the table (id.represent). Attached image with the result. Everything works perfect except when searching records. The issue is that hidden fields (readable = False) are excluded

[web2py] SQLFORM.grid Add and Edit buttons incorrect links when running inside another view

2019-08-17 Thread Flavio Bovio
*Add and edit button links are created incorrectly when de grid is inside another view. With the smartgrid works ok.* *Add button link* http://localhost:8000/erp_proto/tablas_grales/index/addt/forma_pago Return None *Should be*

[web2py] SQLFORM.grid() buttons have no names? 2.17.2-stable

2018-12-30 Thread Paul Ellis
Is there a reason there are no names or ids attached to the grid buttons? Like addBtn, deleteBtn and so on. There's no identifying information on the buttons to make it easy to change the text or colour, for example. I don't want 'Add record' I want something more contextual depending on the

[web2py] SQLFORM.grid search widget width

2018-10-03 Thread Θωμάς Γκλεζάκος
Could someone please help me alter the width of the default field of the search widget in SQLFORM.grid? Thank you in advance for your time Thomas. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] SQLFORM.grid on page with custom request.vars

2018-07-18 Thread watr
I find SQLFORM.grid search doesn't work on a page with custom request.vars. Is there a way to fix the grid so it works? Thanks, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] SQLFORM.grid Add multiple items in links

2018-06-15 Thread watr
Here is my links code: links = [ dict(header='Balance', body=lambda row: row.po.amount - row.invoice_items.amount_pretax), dict(header='Controls', body=[ lambda row: A('Invoices',_class='button btn btn-default',_href=URL('invoice', 'list',

[web2py] SQLFORM.grid: represent a field with IS_IN_SET validator by its label instead of its value

2018-04-15 Thread xelomac
Consider the following example. Model: GENDER = {"male": T("Mr.", lazy=False), "female": T("Ms.", lazy=False)} db.define_table('person', Field('gender', label = T('Salutation'), requires=IS_IN_SET(GENDER)), Field('first_name', label = T('First Name'), Field('last_name',

[web2py] SQLFORM.grid buttons

2018-03-06 Thread Esprit Garonne
Hello, Does it a bug All buttons in SQLFORM have only text link. And I am working on school project for carpool, Could someone help me to build "etapes" like this https://www.blablacar.fr/offer-seats/1 I need only how to add city or remove it for a "one trajet" Could I do it with

[web2py] SQLFORM.grid custom form on validation, oncreate not triggered

2017-11-15 Thread Yebach
Hello I have a custom form from SQLFORM.grid. After clicking the submit button onvalidation or oncreate funciton are not triggered - although some fields are validated, but that is even before the my_processing_form function there is no redirect after submit and the record is not

[web2py] SQLFORM.grid and custom forms behavior

2017-09-26 Thread Tiago Barrionuevo
Hi! I'm trying to use custom forms for the actions used internally by the SQLFORM.grid and that are called by the grid links. I got all that working but now I need to do my own data manipulation after the grid processes and accepts the form. However if I call "mygrid.update_form.accepted"

[web2py] SQLFORM.grid selectable with multiple buttons behaves strange

2017-09-04 Thread A3
When using SQLFORM.grid selectable with multiple button I get the following phenomena: - When I click the buttons the associated action is properly performed. which is the download of a zip file or excel file. - After the download the button text of the second button changed and becomes equal

Re: [web2py] SQLFORM.grid search type error reduce()

2017-08-15 Thread Paul Ellis
ok no more errors. If I search for a name (John) for example in the table i get everything, Or for his ID (11) I get everything. I realise this is a join table (Many to Many) so it's no big deal but the search here is not very useful. I will need to implement special grids for these situations.

[web2py] SQLFORM.grid, pagination and LOAD helper

2017-08-02 Thread Akash B
I'm relatively new to the web2py framework and I've been enjoying writing code because of all the features that the framework provides. Here is the issue I've run into: 1. I have a controller named "demo" with a function "f1" that returns an SQLFORM.grid directly from a table. The

[web2py] SQLFORM.grid search type error reduce()

2017-08-01 Thread Paul Ellis
I am getting this error only when searching the auth_membership table I have put in a basic 'appadmin' in my webapp. I call it 'tooladmin' to differentiate from the built in stuff. I use this function to edit any database table: def manage_table(): tablename = request.args(0) pagetitle

[web2py] SQLFORM.grid with selectable checkboxes that export CSV files on submit

2017-06-29 Thread 'Matthew J Watts' via web2py-users
Hi all I'm trying to modify an SQLFORM.grid so it has selectable check boxes, which allow the user to download selected queries as CSV files once the submit button has been clicked. Can anyone help me with this? Thanks in advance Matt -- Resources: - http://web2py.com -

[web2py] SQLFORM.grid filtering with local and external table

2017-06-12 Thread J-Michel Angers
Hi, My app goes forward, I have plaisure to develop with web2py. But sometimes I don't find myself the solution for very specific search. My app works well now, I can fill a request, add/remove parts, add/remove attached, calculate price, send this request to collect signatures Now I try to

[web2py] SQLFORM.grid - trying to limit search filter to queried items not entire table items

2017-05-31 Thread Peter
I have a person table and a task table, every task references some person. Both tables have a virtual field 'display_name' that constructs a meaningful coded name returned as a string to display on screen if person is a 'client'. SQLFORM.grid is used to provide a selectable list of

[web2py] SQLFORM.grid question

2017-04-24 Thread Jim Russell
Hi all. I'm having an issue with an SQLFORM.gird query. I have a table where one of the columns references another table. Here are the table definitions: db.define_table('osrwhitelistpool', Field('id', type='id'), Field('pool', type='string', length=255, unique=True),

[web2py] SQLFORM.grid without advanced search

2017-04-24 Thread Gael Princivalle
Hello. Is it possible to customize a SQLFORM.grid for having only the global search field? In other words by default when the user click in the global search field another area is displayed that give the possibility to the user to choose in which field he would like to search. I would like to

Re: [web2py] SQLFORM.GRID Change Header and labels too?

2017-04-07 Thread Javier Pepe
Hi You can use de label atribute in Field definition, this used in all forms. - label is a string (or a helper or something that can be serialized to a string) that contains the label to be used for this field in auto-generated forms.

[web2py] SQLFORM.GRID Change Header and labels too?

2017-04-07 Thread r
So I have changed the header for my sqlform grid: grid = SQLFORM.grid(db.adminis,headers={'adminis.Name':'Name','adminis.Description':'Description','adminis.Rating':'Average Rating'}) and when I click on view/edit I would like the same labels to be used. How is it possible ? -- Resources:

[web2py] SQLFORM.grid field.represent not working with joined tables

2017-02-14 Thread Paul Ellis
I have have a grid with a left outer join. So the row objects look like this: I am trying to use represent to make some of them editable. For the optional checkbox it is like this: db.product_offer_item.optional.represent = lambda value, row: INPUT(_type='checkbox',

[web2py] SQLFORM.grid changing the behaviour when there are no records

2017-02-13 Thread Paul Ellis
I want to display something else if the query returns empty. Like some instructions and buttons. I can't find anything in the SQLFORM.grid signature, like an on_empty option and haven't found anything in the book or by googling. As the Add button doesn't fit this situation. I am getting a DIV

[web2py] SQLFORM.grid, groupby and sum/count

2017-01-16 Thread James Booth
Hey guys, I'm trying to create a SQLFORM.grid that will display the total number of entries for each 'user' in a certain time period. Basically, my model states that a user can only be in bursary_entries table once per day (This equates to a user swiping their ID card). I would like to be

[web2py] sqlform.grid search numeric fields

2016-12-03 Thread Scott Hunter
When using the basic (as opposed to advanced) search function of an SQLFORM.grid, it only appears to look in text fields, such that if I enter a number, it doesn't find any matches unless that number appears in a text field (even if that field is not one of the ones displayed in the grid). Is

[web2py] SQLFORM.grid: using groupby disables create?

2016-12-03 Thread Scott Hunter
I have a SQLFORM.grid in which I would like to use groupby as well as be able to create records. But when I supply the groupby parameter, the Add Record button disappears, and can be made to re-appear if the only thing I change is remove the groupby parameter. Is this a bug? If it is a

[web2py] SQLFORM.grid and oncreate error

2016-12-02 Thread Scott Hunter
If the oncreate callback for a SQLFORM.grid sets form.errors to true, the record is not created; similarly, if form.errors. is set to an error message. However, shouldn't the form for adding the record return, and in the latter case, with the specified fields showing their error messages? In

[web2py] SQLFORM.Grid - Export CSV to contain 'links' too

2016-11-29 Thread James Booth
Hey guys, I currently have the following: db.define_table('bursary_users', Field('forename', type='string', requires=IS_NOT_EMPTY()), Field('surname', type='string', requires=IS_NOT_EMPTY()), Field('studentId', type='string',

[web2py] sqlform.grid + virtual field = key_error

2016-09-28 Thread Pierre
Hi, here is the situation: TABLE: db.define_table('amsg', Field('ufrom'), Field('uto', 'reference auth_user'), Field('mailbox_to_use','list:string',requires=IS_IN_SET(( 'internal','private'),multiple=True),

[web2py] SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
Here's a simple controller using an SQLFORM.grid w/ selectable: def open_requests(): print 'Req: %r' % request.vars query = ... form = SQLFORM.grid(query, csv=False, details=False, deletable=False , editable=False, searchable=False, create=False, selectable

[web2py] SQLFORM.grid problems with Oracle database tables

2016-09-06 Thread Nico de Groot
Hi Tom, I think you need to specify the join between the two tables in the query, otherwise you get the full product of the two tables. Please check the Web2py book at http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inner-joins Please show the model files if you

[web2py] SQLFORM.grid problems with Oracle database tables

2016-09-05 Thread 'tomt' via web2py-users
Hi, I have been using SQLFORM.grid to display some legacy Oracle tables. While it works fine when the query is for a single table, as soon as the query involves a join between two tables the grid returns multiple duplicate entries. (I'm using web2py 2.13.4-) The result looks like this:

[web2py] SQLForm.grid csv export

2016-07-28 Thread Ryan Hood
Hello, I'm pretty new to Web2py. I need some help with the SQLForm.grid export CSV functionality.I have the following basic structure: *db.py* db.define_table('test', Field('name', 'string', length=50, notnull=True), Field('email', 'string',

[web2py] SQLFORM.grid input fields size in auto generated Edit/New forms

2016-07-25 Thread icodk
How can I change the input field size (what is visible to the user) of SQLFORM.grid auto generated Edit/New forms. Tried with length=50 but the fields are still about 20 chars long. Also: IS_LENGTH(minsize=5,maxsize=50) had no visible effect. None of the settings limits the number of chars user

[web2py] SQLFORM.grid and fields: suppress columns in the grid

2016-05-24 Thread Martin Weissenboeck
Let's say I have table with two integer fields and one virtual field: db.define_table('t1', Field('aa','integer'), Field('bb','integer'), Field.Virtual('ab', lambda row: row.t1.aa+row.t1.bb), ) The SQLFORM.grid works fine: def ab(): grid=SQLFORM.grid(db.t1,

[web2py] SQLFORM.grid links not working

2016-05-08 Thread Simon Carr
I have an SQLFORM.grid in a view to display a list of supplier contacts When I click "Add Record", I get the error below. Traceback 1. 2. 3. 4. 5. 6. Traceback (most recent call last): File "E:\web2py\gluon\restricted.py", line 227, in restricted exec ccode in environment File

Re: [web2py] SQLFORM.grid change form vars

2016-03-19 Thread Vinyl Darkscratch-Kazotetsu
Ah, I see what my problem is — the default was defined after the SQLFORM.grid() in the controller, not before it. Works like a charm, no errors or issues. As for onvalidation, I’ll give it a whirl and see how it goes. Thank you. > On Mar 15, 2016, at 22:42, Anthony

Re: [web2py] SQLFORM.grid change form vars

2016-03-15 Thread Anthony
On Wednesday, March 16, 2016 at 1:32:26 AM UTC-4, Vinyl Darkscratch-Kazotetsu wrote: > > I see it now — I had assumed that you could set the default in the > controller function, but it seems that it has to be in the model file. > Thank you for your help on this issue. > No, default can be

Re: [web2py] SQLFORM.grid change form vars

2016-03-15 Thread Vinyl Darkscratch-Kazotetsu
I see it now — I had assumed that you could set the default in the controller function, but it seems that it has to be in the model file. Thank you for your help on this issue. Still, though…I would like to know how to edit the variables submitted by the form, and still unsure how to do that.

[web2py] SQLFORM.grid change form vars

2016-03-14 Thread Vinyl Darkscratch-Kazotetsu
It doesn't seem like anyone else has run into this particular issue before. I have an SQLFORM grid that is allowing my staff members on our website to add links to their profile upon the crew page. An example is mine at https://www.nightwave.me/crew?member=VinylDarkscratch However, I found

[web2py] SQLFORM.grid() control detect_record_change

2016-02-26 Thread domezzzz
Ante todo, un saludo al Sr. Massimo Di Pierro y toda la colectividad que lo secunda, por este excelente framework, que no deja de sorprenderme. Contexto del problema: Versión de web2py: 2.13.4 para windows (EXE) (siempre voy al día ;-)) Sistema operativo: windows XP SP3. Db:

[web2py] SQLFORM.grid Search None value on a field

2016-01-22 Thread piero crisci
Hi I am using SQLFORM.grid of last version of web2py with MYSQL. I would like to see all row of a table with a None value in a "Date" field. SQLFORM.grid set the query in this format *db.t_tablename.f_datefield = ""* . The query is converted in this MYSQL where condition: - AND

[web2py] SQLFORM.grid and jQuery-bootgrid help

2016-01-17 Thread piero crisci
Hi I am new using jQuery and not very skilled in general with Javascript. I am using the Basic Jquery Bootgrid example on a SQLFORM.grid and it worked fine, except for one thing. One of the TD column contains a "Server Generated link" with

[web2py] SQLFORM.grid(): help requested

2016-01-11 Thread Wolf-Dieter Klotz
I was struggling quite some time with web2py, but finally solved a lot of misunderstood problems myself. However I never succeeded in the following. In my controller I create a grid with form=SQLFORM.grid(...). form is not an object it is a member of SQLFORM. I want to add custom buttons to the

[web2py] SQLFORM.grid custom buttons text

2015-12-09 Thread Анатолий Стешенко
Good day. How i can change text of buttons of the SQLFORM.grid? For example i want to change "Add Record" to "Add new item","View" to "Show details". -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] SQLFORM.grid with joined tables - choose which table to view/edit by default

2015-11-24 Thread Thomas Sitter
Hello, I have two tables that I'd like to join in a SQLFORM.grid. When viewing or editing an entry in the grid I'd like to edit the cheque table, but by default the customer table is selected. How can I change this? I've recreated the relevant code below. #db.py db.define_table('customer',

[web2py] Re: Web2py SQLFORM.grid with executesql

2015-11-14 Thread Anthony
> > I stumbled on this: > > https://groups.google.com/forum/#!topic/web2py/b5UMpF-3REI > > > but i didn't really get the solution. > The solution mentioned there is the same as this one on Stack Overflow, which involves creating a view or table in

[web2py] Web2py SQLFORM.grid with executesql

2015-11-14 Thread TYRANISTAR
Hello, I am making a web2py application and I have my two mysql tables defined in my models db.py file: db.define_table('table1', Field('id','integer'), Field('name','string'), migrate=False) db.define_table('table2', Field('id','integer'), Field('name','string'), migrate=False) I want

[web2py] SQLFORM.grid export and user_signature issue

2015-11-12 Thread Carlos Kitu
There seems to be an issue with export (any class of export: csv, tsv, ...) in SQLFORM.grid when using user_signature and the corresponding decorator. Pressing any export button in that context generates a: Not authorized. Insufficient privileges - Error Here is a minimal example of the code:

[web2py] sqlform.grid csv export set delimiter

2015-11-10 Thread Yebach
Hello Is it possible to set the delimiter (tab delimited) for csv export from SQLform.grid? also if I want to export some rows but do not want to show them in grid, what is the syntax to use (I want to hide a column db.workers.id, but i want to export it)? thank you -- Resources: -

[web2py] SQLFORM.grid: search in a list:reference field does not work

2015-11-08 Thread Martin Weissenboeck
I have a table like db.define_table("mytable", Field("reffield", "list:reference anothertable"), ) The search widget of SQLFORM.grid("mytable", ...) does not show the reffield . In gloun/sqlhtml.py I have found if fields[0]._db._adapter.dbengine == 'google:datastore':

[web2py] [SQLFORM.grid] fields order in view / request.args(0)

2015-11-07 Thread Mamisoa Andriantafika
[SQLFORM.grid] fields order in view / request.args(0) Hi, I have 2 questions relative to this controller: def p_list(): # i = request.args(0) or 7 // not working, invalid literal base 10 on edit/profile i = 7 grid = SQLFORM.grid(db.auth_membership.group_id==i,

Re: [web2py] [SQLFORM.grid] fields order in view / request.args(0)

2015-11-07 Thread Vinicius Assef
I didn't understand your 1st question. To solve your 2nd problem, pass the `fields` argument as a list. -- Vinicius Assef On 7 November 2015 at 21:53, Mamisoa Andriantafika wrote: > [SQLFORM.grid] fields order in view / request.args(0) > > Hi, > > I have 2 questions

[web2py] sqlform.grid

2015-10-29 Thread Laurent Lc
Hi, i'd like a very simple example please (i begin) : could you tell me how to do for updating a field when i use sqlform.grid. Example: my db : db.define_table('message', Field('firstname',requires=IS_NOT_EMPTY()), Field('lastname',requires=IS_NOT_EMPTY()),

[web2py] SQLFORM.grid: trigger edit when clicking anywhere on the row itself

2015-10-24 Thread Julian Sanchez
Is there an easy way to trigger the same URL you get when pressing the built-in 'edit' button of the SQLFORM.grid without having to show that button? I have a few grids that would show cleaner if users could go directly to the edit page by clicking on the row itself (no need to view details).

[web2py] SQLFORM.grid + count

2015-10-01 Thread Bruno Oliveira
I'm trying to create a SQLFORM.grid in web2py that group 2 fields and count them up, but I couldn't figure it out how to do it. *Model* db.define_table('invocados', Field('modulo_servico', 'string', label='Módulo (Serviço)', default=IS_LENGTH(2)),

[web2py] SQLFORM.grid links bug

2015-09-21 Thread zenzeromod
Hi All, I was customizing a SQLFORM.grid startig from the code: model: db.define_table('aziende', Field('ragione_sociale', requires=[IS_NOT_EMPTY( error_message=err_mess),

[web2py] SQLFORM.grid and ractive

2015-09-17 Thread weheh
Anybody ever try to get an SQLFORM.grid(...) to render within a ractive template? I'm having trouble getting it to work. SQLTABLE works OK, but grid seems to bundle a script, which causes ractive to choke. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] SQLFORM.grid shows ids instead of names only in Linux

2015-08-21 Thread Antonio Salazar
My application shows integer ids instead of names for any table I update using SQLFORM.grid(). It's running a source installation on Apache2 on Linux. The database is PostgreSQL on Windows. Using the same application on the integrated web server in Windows shows the names correctly. I'm using

[web2py] SQLFORM.grid different classes for add and edit forms

2015-08-10 Thread Najtsirk
Hello, is it possible to assign different classes for add and edit forms in SQLFORM.grid? A this point there is no difference between them so I cannot use proper CSS selectors for JS. Best, Najtsirk -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] SQLFORM.grid and buttons in custom update_form

2015-07-17 Thread Massimiliano
Hi, I'm trying to customize the grid in edit mode. Something like: {{if 'grid' in globals():}} {{if grid.update_form:}} {{form = grid.update_form}} {{=form.custom.begin}} {{=form.custom.submit}} {{=form.custom.end}} {{else:}}

[web2py] Web2py SQLFORM.grid maxtextlengths etc

2015-06-12 Thread jackson . read
I can only get my grid field the width the width I want them in a SQLFORM.grid by padding the headers w/non blank chars. I have tried using maxtextlengths dictionary maxtextlength to set all. Neither seems to have any effect. I also removed my layout but the fields widths stayed the same.

[web2py] sqlform.grid maxtextlengths shoots blanks

2015-06-11 Thread jackson . read
I get the same truncated display for the log message text no matter what I set maxtextlengths...This app is rock+1 on the IQ simplicity scale and yet it does not work...BTW: I removed all layouts stuff so its not some css problem. The truncated fields are what the grid wants to display. Its

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2015-06-05 Thread Alex Glaros
vars passed to controller doing grid search disappear seem that updating w2p to keep the vars after grid search would be a good improvement thanks! Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread Johann Spies
On 10 May 2015 at 04:26, A36_Marty ma...@mccaslandcorp.com wrote: fields = db.auth_user.first_name, db.auth_group.role Make that fields = [db.auth_user.first_name, db.auth_group.role] fields should be a list. query = (db.auth_user)(db.auth_group.id == PARENT_GROUP_ID) #get query not

Re: [web2py] SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread A36_Marty
Thanks for your response. I changed the fields to a list and that works fine. Ditto for the field.represent feature. Thanks! I am still having problems getting the WHERE clause correctly inserted in the query. (The 2-3 different query assignments I originally posted were variations I had

[web2py] SQLFORM.grid multiple left joins and where clause

2015-05-09 Thread A36_Marty
A few novice questions while learning the SQLFORM.grid on a throw-away app. My apologies for the basic questions *1) How to show all users (auth_user) and related group roles (auth_group.role) only for certain auth_groups?* I can display *all* groups with the following code, but can't seem

[web2py] SQLFORM.grid order of fields on create or edit form

2015-04-21 Thread Kyle Flanagan
I know you can specify the order of fields for the main view of an SQLFORM.grid using the optional fields parameter, however, whenever you choose to add a new record, the order seems to be dictated by the order in which the fields were created in the table definition. Is there a way to

[web2py] SQLFORM.grid search with multiple terms

2015-03-09 Thread Ian Holser
The search function on SQLFORM grid works fine for single terms, but when typing multiple terms, it doesn't seem to work. For example: If I have a field value of 'example example1', it will find it with a search for 'example' or 'example1'. A search for 'example example1' comes up with the

[web2py] sqlform.grid populated with an AJAX call, grid search doesn't work correctly

2015-03-04 Thread drmbded
I have a relatively simple page which has a drop down selection and an empty DIV. When a user selects an item from the drop down an ajax call back to web2py creates an sqlform.grid with a left join query and populates the empty DIV with the grid. This works great. Now if I use the search

[web2py] SQLFORM.grid without database IO

2015-02-23 Thread Martin Weissenboeck
There is a paragraph in the book called SQLFORM without database IO. Is it possible to do the same with a grid? Regards, Martin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] SQLFORM.grid check if record in db

2015-01-27 Thread Yebach
Hello I have a SQLFORM.grid page Values for one filed (code) in add or edit view is filed with js code from values of two other fields. User can deactivate this record - it can not be deleted only status is set to e.g. 100 If user creates a new record that creates the same values for code

[web2py] Re: web2py sqlform.grid join problem

2015-01-04 Thread Tim Richardson
Do you know how to use web2py's DAL to make a query which joins tables? http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inner-joins Once you do, give that query to SQLFORM.grid Note that you need to understand what exactly a DAL query is. The term is subtly

[web2py] web2py sqlform.grid join problem

2015-01-03 Thread Roman Rakus
Hi, I have folloving tables. db.define_table('tbl1', Field('code', 'string')) db.define_table('tbl2', Field('field1', 'integer', 'reference tbl1'), Field('field2', 'integer', 'reference tbl1')) Now I need render values from tbl2 in sqlform.grid. How I can join tbl2.field1 and tbl2.field2 on

[web2py] sqlform.grid with double join

2015-01-03 Thread Roman Rakus
Hi, I have folloving tables. db.define_table('tbl1', Field('code', 'string')) db.define_table('tbl2', Field('field1', 'integer', 'reference tbl1'), Field('field2', 'integer', 'reference tbl1')) Now I need render values from tbl2 in sqlform.grid. How I can join tbl2.field1 and tbl2.field2 on

[web2py] SQLFORM.grid stylize

2014-12-04 Thread Yebach
Hello What is the best way to stylize my SQLFORM.grid form E.g.: my dropdown field is smaller the others also the edit form is as wide as the page I would like to reduce the size, etc. thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] SQLFORM.grid extra button

2014-12-02 Thread Yebach
Hello I have a SQLFORM.grid and beside the default buttons (edit,view, delete,...) I would like to add a new one to change a status in my database table. Any suggestions? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] SQLFORM.grid field is not empty if another field is full

2014-12-01 Thread Yebach
Hello I have a SQLFORM.grid and I have to raise error for user if he inserts value into one field and not another. Example start 1 10:00 end 1 12:00 - has to show error if field is empty - start 2 16:00 - not necessary to be inserted end 2 20:00 - has to show error if start 2 is not empty

Re: [web2py] SQLFORM.grid custom search where is the error?

2014-11-18 Thread Prasad Muley
This problem still exist in web2py 2.9.6. I've tried to use custom grid search But It is showing me invalid query near grid. On Thursday, February 21, 2013 10:09:33 PM UTC+5:30, Mandar Vaze wrote: I'm using Version 2.3.2 (2012-12-17 15:03:30) stable and the problem still persists. i.e.

[web2py] SQLFORM.grid edit only selects the first record and updates all records.

2014-11-18 Thread Stephen McCamy
Hello, I am having an issue with SQLFORM.grid where when there are more than one records returned the edit button only shows data for the first record. If I do update it then updates all the records with the new values. I can't seem to figure out why. Here is my db definition:

[web2py] SQLFORM.grid want no initial values

2014-11-03 Thread Wayne Tooley
Hi Everyone; I'm new to web2py and love it. I have a simple question that I can't seem to find a simple answer to. I want to use SQLFORM.gid but not to load any values unless searched for. Maybe I'm using the wrong thing but is there a simple way to do this? my code is this: def

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Mandar Vaze
Current code looks like this : https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2031 See if it helps -Mandar P.S. : I posted original query (2 yrs ago) but as mentioned earlier in the thread - I ended up using session variable though. -- Resources: - http://web2py.com -

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Alen Cerovic
Hi Mandar, as you pointed me to source it seems there is still just args parameter. I tried with session.vars but somehow I was loosing those vars and it just did not feel right to me. I ended up switching to args and pass those request.args to grid as args parameter. It works now but I like

[web2py] SQLFORM.grid search: how to show only a subset of available search fields?

2014-10-26 Thread Jack Kuan
Answering my own question: my solution is to massage the returned grid object, removing duplicate options and other unwanted html elements. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-25 Thread Alen Cerovic
two years later I am struggling with same problem, is grid vars parameter now included in web2py? Dana srijeda, 24. listopada 2012. 11:56:21 UTC+2, korisnik Niphlod napisao je: isn't this a little silly ? we have an args parameter to the grid but not a vars one Could you try to test a

[web2py] SQLFORM.grid search: how to show only a subset of available search fields?

2014-10-22 Thread Jack Kuan
Hi, I'm using left=[...] when creating a searchable SQLFORM.grid. My problem is that the drop-down menu for choosing which fields to build the search query contains ALL the fields in the search result. Is there a way to limit it to only a subset of the fields like what the 'fields' argument of

[web2py] SQLFORM.grid in LOAD() search error

2014-09-10 Thread Ariya Owam-aram
Dear all, There is an error when use SQLFORM.grid in LOAD function. This are steps to reproduce the problem? *Step 0* # in models/db.py db.define_table('product', Field('code', length = '50', notnull = True, unique = True), Field('name', notnull = True), ) *Step

[web2py] sqlform.grid default search value

2014-09-04 Thread Douglas Campbell
Is it possible to have a default search value in an sqlform.grid? I do not see the option in the docs and have not figured out a work around. What I truly want to do is have the page JUST load the search bar and not the database results. Then once a search term is entered it shows the results

[web2py] SQLFORM.grid links and inner join

2014-08-28 Thread Louis Amon
I have a simple one-to-many relation like so: db.define_table('person', Field('job')) db.define_table('thing', Field('owner_id', 'reference person')) And I built a grid using SQLFORM.grid like so: grid = SQLFORM.grid((db.person.id == db.thing.owner_id),

[web2py] sqlform.grid edit view back button

2014-08-19 Thread Yebach
Hello I have to create multiple sqlform.grids in my page i used bootstrap tabs to load different htmls with different controller functions (each for every grid) It works ok and does the trick except when I edit record I and click the back button the link is not back to the page it was so I

Re: [web2py] SQLFORM.grid: sorting

2014-07-18 Thread Jacinto Parga
Hi, I solved it putting the foreing key format in the controller, before the grid: def familia_manage(): *db.auth_user._format = '%(last_name)s %(first_name)s'* fields=[db.t_familiares.f_nombre, db.t_familiares.f_apellidos,db.t_familiares.f_titular] form =

Re: [web2py] SQLFORM.grid: sorting

2014-07-18 Thread Massimo Di Pierro
You cannot a have an inner join in smartgrid. That's the biggest difference in this case. You can have orderby. On Monday, 21 May 2012 15:47:53 UTC-5, Jim S wrote: Massimo - Is there a way to do it with a .smartgrid. I know the question wasn't on .smartgrid, but I'm using that

[web2py] SQLform.Grid problems with lookout and url

2014-07-14 Thread Yebach
If anyone can hellp me with this I have a page with embeded htmls. One of them should have a SQLForm.grid to manage table of workers I am having difficulties because SQLForm.grid is in edit function. Besides the fact that it looks awful it also does not work properly I asked a question on

[web2py] SQLFORM.grid detect_record_change

2014-07-09 Thread Otto Domínguez
Is it possible to use detect_record_change while submitting an edit with SQLFORM.grid. I'm talking the remotely possible but still possible case where two users choose to edit the same record simultaneously. Just the first one to submit her/his change should be successful. The second one

  1   2   3   4   >