Skip to profile content
When creating VARCHAR columns in PostgreSQL with a default value (for example, column_1 with a length of 1 and a default value of ‘N’), the error “Value too long for character varying 1” occurs. This happens because the default values ​​are read in model.php; for that column, the value becomes 'N'::…
Hi Johnny, The grouping feature is very useful; however, users tell me it’s difficult to see the tab names and know which one is active. Is there a way to configure this? [jo]
Yes, it’s a problem. I solved it by creating functions to convert booleans to integers and then using a yes/no dropdown.
Works perfectly with postgreSQL views :smiley:
Thanks Johnny! [cees] I will test this feature, since I have been using views, which have the id field as their “primary key,” always the id field. They have been very useful to me since the setPrimarykey function does not work in views.
This is my table CREATE TABLE IF NOT EXISTS public.encuesta ( encuesta_id integer NOT NULL DEFAULT nextval(‘encuesta_encuesta_id_seq’::regclass), tipo_encuesta_id integer, subtipo_encuesta_id integer, cobertura_id integer, levantamiento_id integer, confianza_error_id integer, tecnica_id int…
Hi When filtering dates in the column header, an error occurs, when debugging SQL the query is done with ilke [date] [debug]
Unfortunately I had to go back to my castAs implementation, since when exporting to Excel the boolean fields appear as 1 and 0 :cry:
Hi Johnny, I’m trying to use the set Relation to N to N function. $crud->setRelationNtoN(‘brand_id’, ‘models’, ‘brands’, ‘model_id’, ‘brand_id’, ‘brand’); The brands and models don’t match. Looking at the database query logs, the following query appears. SELECT “models”.“model_id” AS “model_id”,…
Thanks I’ve been waiting for this feature for a while. Every update required changing the GC core. I created a function, castAs(), in which I changed booleans to int and fields to dropdown. $crud->fieldType('supervisor','dropdown',['0' => 'No', '1' => 'Si']); $crud->fieldType('encuestador'…
Muchas gracias, amigo!
Hi Johnny The inline editing feature is fantastic. I have a custom function to view images from an Upload Field in Laravel’s storage. When saving the inline editing of another text field that isn’t related to the upload field, it fails. The controller is named EncuestadorController.php MY code …
It was resolved with a view: WITH base AS ( SELECT row_number() OVER (ORDER BY dispersion.fecha_hora) AS id, dispersion.encuesta_id, dispersion.encuestador_id, dispersion.fecha_hora, dispersion.banco_id, dispersion.importe AS transferido, sum(dispersion.importe) OVER (PARTITION BY dispersion…
Hi Johnny Is it possible to retrieve data from a function with two parameters from PostgreSQL? The function returns a table. I’m using Laravel 11. Thanks and best regards.
Johnny: Thank you so much!!!
Johnny Thank you very much. With more than two letters it starts to filter. The problem is again the capital letters. If you start writing with lowercase letters, it doesn’t filter anything.
Hi Johnny I use postgresql 17 as database. When using the setDependentRelation function, in the grid column, the dependent combo does not have any data, it is only displayed when creating and editing records. [gc]
I use Laravel 12 and postgreSQL, I didn’t find a way to implement it in the controller.
Good afternoon. I’m using PostgreSQL with GCE. The column headers where searches are performed aren’t ILIKE. How can I fix this? Thanks
I love this new feature!
Thansk Johnny! I have new version!
GC 3.1.7 $crud->setTable('bancos'); $crud->setSubject('Bancos', 'Bancos'); $crud->setCsrfTokenName('_token'); $crud->setCsrfTokenValue(csrf_token()); $crud->unsetDeleteMultiple(); $output = $crud->render();
Hello Johnny Can you helpme with this issue? I migrate to new version 3.18 [Screenshot 2024-08-30 231607]
Hi Johnny Can you put this code in the export to excel ExportState.php please: // Redirect output to a client’s web browser (Excel2007) header(‘Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet’); header(‘Content-Disposition: attachment;filename="’ . str_replace([…
It works for me, thanks Johnny!
If there is a single select control on the create form, there is not enough space to display the list [Screenshot 2024-08-03 210532]
Excellent Johnny, for now, I made a small adjustment to the model and the states to include a method, “cast”, which converts the boolean to integer and can be used with “Yes”, “No”. :slight_smile:
Boolean fields work fine in GC Enterprise 2, but not in version 3. I have dealt with the following: $crud->fieldType('nacional','checkbox_boolean',['1' => 'true', '' => 'false']); $crud->fieldType('nacional','dropdown', [ null => 'no', 1 => 'yes' ]); $crud->fieldTy…
Sorry Johnny, it was my fault, I just wanted to help someone else with another error that I didn’t report.