Re: [Qgis-user] Default values in form
Hi, I would also think the way Bernhard is describing it below. But I do think that we need a more fine-grained way for each column to specify whether it should use the last value or the default value. But in general, if not specified otherwise, the last value should have precedence. Andreas Am 2015-06-29 09:04, schrieb Bernhard Ströbl: Hi, my expectation would be just the other way round: if I (globally) set reuse last values I would expect them to override any defaults. Bernhard Am 28.06.2015 um 09:55 schrieb didier peeters: Hi Andreas, it would be nice to have these options: by default the default values precede the last inserted values (otherwise defining default values would be somehow useless), except where specified otherwise in the field definitions. So there would be an option in each field definition (a checkbox, next to the default value definition field) stating that the last non null inserted values do precede the default one. Cheers, Didier Le 26 juin 2015 à 14:15, Andreas Neumann a.neum...@carto.net a écrit : Hi, When doing anything with default values we also have to think about the option we have which automatically fills in the values of the last inserted record. Which one has precedence? The default value or the value of the last record? Also - I think we probably need a mixture of default values and values from the last record - but I think the values of the last record are not fine-grained enough - so we could tell QGIS to use the values from the last record for some columns but for other columns use the default value. We have to think about both approaches and need a collaboration of both, in my opinion. Andreas On 26.06.2015 12:14, didier peeters wrote: Thanks, I’ll surely take a look at your plugin, and open a ticket if necessary. @Stefan : I had seen that post by Nathan Woodrow, but was hoping for something ‘lighter’ … Didier Le 26 juin 2015 à 11:32, Bernhard Ströbl bernhard.stro...@jena.de a écrit : Hi, if you define the values as default in PostgreSQL and use my :) plugin DataDrivenInputMask [1] these values are inserted in the mask that is created by the plugin in QGIS. Thus for fields with defaults you cannot insert NULL vallues (but that's why you define a default). Bernhard http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 26.06.2015 um 10:08 schrieb didier peeters: Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11847 (20150626) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Didier Peeters Institut de Gestion de l'Environnement et d'Aménagement du Territoire (IGEAT) Université Libre de Bruxelles (ULB) CP130/03 av. F. D. Roosevelt 50 B-1050 Bruxelles Tél : +32-2-650 68 17 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11858 (20150629) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi, my expectation would be just the other way round: if I (globally) set reuse last values I would expect them to override any defaults. Bernhard Am 28.06.2015 um 09:55 schrieb didier peeters: Hi Andreas, it would be nice to have these options: by default the default values precede the last inserted values (otherwise defining default values would be somehow useless), except where specified otherwise in the field definitions. So there would be an option in each field definition (a checkbox, next to the default value definition field) stating that the last non null inserted values do precede the default one. Cheers, Didier Le 26 juin 2015 à 14:15, Andreas Neumann a.neum...@carto.net a écrit : Hi, When doing anything with default values we also have to think about the option we have which automatically fills in the values of the last inserted record. Which one has precedence? The default value or the value of the last record? Also - I think we probably need a mixture of default values and values from the last record - but I think the values of the last record are not fine-grained enough - so we could tell QGIS to use the values from the last record for some columns but for other columns use the default value. We have to think about both approaches and need a collaboration of both, in my opinion. Andreas On 26.06.2015 12:14, didier peeters wrote: Thanks, I’ll surely take a look at your plugin, and open a ticket if necessary. @Stefan : I had seen that post by Nathan Woodrow, but was hoping for something ‘lighter’ … Didier Le 26 juin 2015 à 11:32, Bernhard Ströbl bernhard.stro...@jena.de a écrit : Hi, if you define the values as default in PostgreSQL and use my :) plugin DataDrivenInputMask [1] these values are inserted in the mask that is created by the plugin in QGIS. Thus for fields with defaults you cannot insert NULL vallues (but that's why you define a default). Bernhard http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 26.06.2015 um 10:08 schrieb didier peeters: Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11847 (20150626) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Didier Peeters Institut de Gestion de l'Environnement et d'Aménagement du Territoire (IGEAT) Université Libre de Bruxelles (ULB) CP130/03 av. F. D. Roosevelt 50 B-1050 Bruxelles Tél : +32-2-650 68 17 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11858 (20150629) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi Didier, You can still create a feature request, just add a link to the QEP in there so a reader is aware of it. The general discussion about it is on the following page. I think you will need a github account to comment (just create one if you don't have one yet). https://github.com/qgis/QGIS-Enhancement-Proposals/pull/13 On the top is a link Files changed, if you go there you should be able to comment on individual lines. Cheers, Matthias On 06/28/2015 09:34 AM, didier peeters wrote: Hi Matthias, In a previous e-mail you said that you would prefer to have a global redesign of the field definition and form tab(s) ; should I create this specific feature request anyway or wouldn’t fit into your QEP instead ? And by the way, I’m not sure about how to add comments to your QEP, I’m not familiar with this tool. Cheers, Didier Le 26 juin 2015 à 16:26, Matthias Kuhn matthias.k...@gmx.ch a écrit : Hi Didier On 06/26/2015 12:36 PM, didier peeters wrote: Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? That can easily be added as a feature request. Cheers Matthias ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi Andreas, it would be nice to have these options: by default the default values precede the last inserted values (otherwise defining default values would be somehow useless), except where specified otherwise in the field definitions. So there would be an option in each field definition (a checkbox, next to the default value definition field) stating that the last non null inserted values do precede the default one. Cheers, Didier Le 26 juin 2015 à 14:15, Andreas Neumann a.neum...@carto.net a écrit : Hi, When doing anything with default values we also have to think about the option we have which automatically fills in the values of the last inserted record. Which one has precedence? The default value or the value of the last record? Also - I think we probably need a mixture of default values and values from the last record - but I think the values of the last record are not fine-grained enough - so we could tell QGIS to use the values from the last record for some columns but for other columns use the default value. We have to think about both approaches and need a collaboration of both, in my opinion. Andreas On 26.06.2015 12:14, didier peeters wrote: Thanks, I’ll surely take a look at your plugin, and open a ticket if necessary. @Stefan : I had seen that post by Nathan Woodrow, but was hoping for something ‘lighter’ … Didier Le 26 juin 2015 à 11:32, Bernhard Ströbl bernhard.stro...@jena.de a écrit : Hi, if you define the values as default in PostgreSQL and use my :) plugin DataDrivenInputMask [1] these values are inserted in the mask that is created by the plugin in QGIS. Thus for fields with defaults you cannot insert NULL vallues (but that's why you define a default). Bernhard http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 26.06.2015 um 10:08 schrieb didier peeters: Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11847 (20150626) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Didier Peeters Institut de Gestion de l'Environnement et d'Aménagement du Territoire (IGEAT) Université Libre de Bruxelles (ULB) CP130/03 av. F. D. Roosevelt 50 B-1050 Bruxelles Tél : +32-2-650 68 17 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi Matthias, In a previous e-mail you said that you would prefer to have a global redesign of the field definition and form tab(s) ; should I create this specific feature request anyway or wouldn’t fit into your QEP instead ? And by the way, I’m not sure about how to add comments to your QEP, I’m not familiar with this tool. Cheers, Didier Le 26 juin 2015 à 16:26, Matthias Kuhn matthias.k...@gmx.ch a écrit : Hi Didier On 06/26/2015 12:36 PM, didier peeters wrote: Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? That can easily be added as a feature request. Cheers Matthias ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Default values in form
Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi Didier On 06/26/2015 12:36 PM, didier peeters wrote: Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? That can easily be added as a feature request. Cheers Matthias ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi Didier, On Fri, 26. Jun 2015 at 10:08:12 +0200, didier peeters wrote: Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. If the column has default values in postgis they will already be used as default value in the form. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: Digital signature ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
I think this would fit into the area of this QEP: https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields It could be added to the list Information about fields next to constraints. Any feedback on it is welcome. Matthias On 06/26/2015 11:35 AM, Paolo Cavallini wrote: Agreed, an important improvement. Please open a ticket if not already there. All the best. Il 26 giugno 2015 08:16:32 GMT+00:00, Blumentrath, Stefan stefan.blumentr...@nina.no ha scritto: Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- http://faunalia.eu/ Sent from mobile, sorry for being short ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Thanks, I’ll surely take a look at your plugin, and open a ticket if necessary. @Stefan : I had seen that post by Nathan Woodrow, but was hoping for something ‘lighter’ … Didier Le 26 juin 2015 à 11:32, Bernhard Ströbl bernhard.stro...@jena.de a écrit : Hi, if you define the values as default in PostgreSQL and use my :) plugin DataDrivenInputMask [1] these values are inserted in the mask that is created by the plugin in QGIS. Thus for fields with defaults you cannot insert NULL vallues (but that's why you define a default). Bernhard http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 26.06.2015 um 10:08 schrieb didier peeters: Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11847 (20150626) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Didier Peeters Institut de Gestion de l'Environnement et d'Aménagement du Territoire (IGEAT) Université Libre de Bruxelles (ULB) CP130/03 av. F. D. Roosevelt 50 B-1050 Bruxelles Tél : +32-2-650 68 17 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Agreed, an important improvement. Please open a ticket if not already there. All the best. Il 26 giugno 2015 08:16:32 GMT+00:00, Blumentrath, Stefan stefan.blumentr...@nina.no ha scritto: Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- http://faunalia.eu/ Sent from mobile, sorry for being short___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi, if you define the values as default in PostgreSQL and use my :) plugin DataDrivenInputMask [1] these values are inserted in the mask that is created by the plugin in QGIS. Thus for fields with defaults you cannot insert NULL vallues (but that's why you define a default). Bernhard http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 26.06.2015 um 10:08 schrieb didier peeters: Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11847 (20150626) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi, When doing anything with default values we also have to think about the option we have which automatically fills in the values of the last inserted record. Which one has precedence? The default value or the value of the last record? Also - I think we probably need a mixture of default values and values from the last record - but I think the values of the last record are not fine-grained enough - so we could tell QGIS to use the values from the last record for some columns but for other columns use the default value. We have to think about both approaches and need a collaboration of both, in my opinion. Andreas On 26.06.2015 12:14, didier peeters wrote: Thanks, I’ll surely take a look at your plugin, and open a ticket if necessary. @Stefan : I had seen that post by Nathan Woodrow, but was hoping for something ‘lighter’ … Didier Le 26 juin 2015 à 11:32, Bernhard Ströbl bernhard.stro...@jena.de a écrit : Hi, if you define the values as default in PostgreSQL and use my :) plugin DataDrivenInputMask [1] these values are inserted in the mask that is created by the plugin in QGIS. Thus for fields with defaults you cannot insert NULL vallues (but that's why you define a default). Bernhard http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 26.06.2015 um 10:08 schrieb didier peeters: Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 11847 (20150626) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Didier Peeters Institut de Gestion de l'Environnement et d'Aménagement du Territoire (IGEAT) Université Libre de Bruxelles (ULB) CP130/03 av. F. D. Roosevelt 50 B-1050 Bruxelles Tél : +32-2-650 68 17 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? Didier Le 26 juin 2015 à 12:07, Matthias Kuhn matthias.k...@gmx.ch a écrit : I think this would fit into the area of this QEP: https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields It could be added to the list Information about fields next to constraints. Any feedback on it is welcome. Matthias On 06/26/2015 11:35 AM, Paolo Cavallini wrote: Agreed, an important improvement. Please open a ticket if not already there. All the best. Il 26 giugno 2015 08:16:32 GMT+00:00, Blumentrath, Stefan stefan.blumentr...@nina.no mailto:stefan.blumentr...@nina.no ha scritto: Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.org mailto:qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user http://lists.osgeo.org/mailman/listinfo/qgis-user Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user http://lists.osgeo.org/mailman/listinfo/qgis-user -- http://faunalia.eu http://faunalia.eu// Sent from mobile, sorry for being short ___ Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
Hi, I am about to file a ticket for this. Another thought in this context: When defining default values it would be splendid if one could use variables (e.g. %USER% or expressions like in the field calculator or Relation Reference widget). What do you think? The latter could probably go into a new widget type Calculated? Another thing in this context could be adding the possibility do define Mouse-over effects in order to help understanding attribute content better (e.g. Units, backgrounds, how to measure in the field...)?! Lables are not allways sufficient, but maybe the GUI gets too fidgety? Should a request for this go into separate tickets? Cheers Stefan From: qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 12:36 To: qgis-user Subject: Re: [Qgis-user] Default values in form Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? Didier Le 26 juin 2015 à 12:07, Matthias Kuhn matthias.k...@gmx.chmailto:matthias.k...@gmx.ch a écrit : I think this would fit into the area of this QEP: https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields It could be added to the list Information about fields next to constraints. Any feedback on it is welcome. Matthias On 06/26/2015 11:35 AM, Paolo Cavallini wrote: Agreed, an important improvement. Please open a ticket if not already there. All the best. Il 26 giugno 2015 08:16:32 GMT+00:00, Blumentrath, Stefan stefan.blumentr...@nina.nomailto:stefan.blumentr...@nina.no ha scritto: Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.orgmailto:qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I'm inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that's the definition of a default value, and I don't think that using layers stored in Postgis would make any difference. Thanks Didier Qgis-user mailing list Qgis-user@lists.osgeo.orgmailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Qgis-user mailing list Qgis-user@lists.osgeo.orgmailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- http://faunalia.euhttp://faunalia.eu// Sent from mobile, sorry for being short ___ Qgis-user mailing list Qgis-user@lists.osgeo.orgmailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.orgmailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Default values in form
PS: I would prefer to work on a holistic approach instead of adding individual tickets. To prevent the user interface from getting even more cluttered by letting it grow organically. It always makes me want to scream when I see the fields configuration dialog. Until I realize that it was actually also me adding a lot of stuff in there. Therefore, please add comments and improvements to this document: https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields and the associated discussion https://github.com/qgis/QGIS-Enhancement-Proposals/pull/13 Cheers Matthias On 06/26/2015 01:53 PM, Matthias Kuhn wrote: Hi, Yes, tooltips that show the comments would also be great. It would be nice to show * the database comments (if supported by the backend) as default * allow to override it in the configuration Default values from expressions would also be a great addition. I think it would be better to define it directly on the field (and not on its widget). This way you can later turn the widget into something else (e.g. from text to range) without reconfiguring the default value. And it should have defaults for the defaults :) being read from the database where possible. Cheers, Matthias On 06/26/2015 01:05 PM, Blumentrath, Stefan wrote: Hi, I am about to file a ticket for this. Another thought in this context: When defining “default values” it would be splendid if one could use variables (e.g. %USER% or expressions like in the field calculator or Relation Reference widget). What do you think? The latter could probably go into a new widget type Calculated? Another thing in this context could be adding the possibility do define “Mouse-over effects” in order to help understanding attribute content better (e.g. Units, backgrounds, how to measure in the field…)?! Lables are not allways sufficient, but maybe the GUI gets too fidgety? Should a request for this go into separate tickets? Cheers Stefan *From:*qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] *On Behalf Of *didier peeters *Sent:* 26. juni 2015 12:36 *To:* qgis-user *Subject:* Re: [Qgis-user] Default values in form Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? Didier Le 26 juin 2015 à 12:07, Matthias Kuhn matthias.k...@gmx.ch mailto:matthias.k...@gmx.ch a écrit : I think this would fit into the area of this QEP: https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields It could be added to the list Information about fields next to constraints. Any feedback on it is welcome. Matthias On 06/26/2015 11:35 AM, Paolo Cavallini wrote: Agreed, an important improvement. Please open a ticket if not already there. All the best. Il 26 giugno 2015 08:16:32 GMT+00:00, Blumentrath, Stefan stefan.blumentr...@nina.no mailto:stefan.blumentr...@nina.no ha scritto: Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.org mailto:qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman
Re: [Qgis-user] Default values in form
Hi, Yes, tooltips that show the comments would also be great. It would be nice to show * the database comments (if supported by the backend) as default * allow to override it in the configuration Default values from expressions would also be a great addition. I think it would be better to define it directly on the field (and not on its widget). This way you can later turn the widget into something else (e.g. from text to range) without reconfiguring the default value. And it should have defaults for the defaults :) being read from the database where possible. Cheers, Matthias On 06/26/2015 01:05 PM, Blumentrath, Stefan wrote: Hi, I am about to file a ticket for this. Another thought in this context: When defining “default values” it would be splendid if one could use variables (e.g. %USER% or expressions like in the field calculator or Relation Reference widget). What do you think? The latter could probably go into a new widget type Calculated? Another thing in this context could be adding the possibility do define “Mouse-over effects” in order to help understanding attribute content better (e.g. Units, backgrounds, how to measure in the field…)?! Lables are not allways sufficient, but maybe the GUI gets too fidgety? Should a request for this go into separate tickets? Cheers Stefan *From:*qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] *On Behalf Of *didier peeters *Sent:* 26. juni 2015 12:36 *To:* qgis-user *Subject:* Re: [Qgis-user] Default values in form Hello Mathias, this would be great ! Additionally, this makes me think of another possible enhancement: when displaying a picture in a form tab, it could be nice to hide the label and path/url to the file, which is most of the time useless. Do I need to do anything more to make these suggestions ? Didier Le 26 juin 2015 à 12:07, Matthias Kuhn matthias.k...@gmx.ch mailto:matthias.k...@gmx.ch a écrit : I think this would fit into the area of this QEP: https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields It could be added to the list Information about fields next to constraints. Any feedback on it is welcome. Matthias On 06/26/2015 11:35 AM, Paolo Cavallini wrote: Agreed, an important improvement. Please open a ticket if not already there. All the best. Il 26 giugno 2015 08:16:32 GMT+00:00, Blumentrath, Stefan stefan.blumentr...@nina.no mailto:stefan.blumentr...@nina.no ha scritto: Hei Didier, I guess you could use a python init function for the form in order to define default values (see: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/). However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)... Cheers Stefan -Original Message- From: qgis-user-boun...@lists.osgeo.org mailto:qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of didier peeters Sent: 26. juni 2015 10:08 To: qgis-user Subject: [Qgis-user] Default values in form Hello, Simple question : is there a way to set a default value for an attribute in QGis ? I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference. Thanks Didier Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- http://faunalia.eu http://faunalia.eu// Sent from mobile, sorry for being short ___ Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user