Questions tagged [default-value]
The default-value tag has no summary.
35 questions
4 votes
1 answer
151 views
Permanently modify default symbology in QGIS when adding a vector layer
I am working with a lot of vector layers in a lot of different QGIS projects on a daily basis. When I add a vector layer, I systematically change the stroke symbology to "No line" (...
1 vote
1 answer
72 views
Optional argument has wrong value when used with action trigger
QGIS 3.36.2, Python 3.12.3 I've got a regular action that is part of a toolbar and that calls a function when pressed, which uses an optional argument with a default value: class MyClass: def ...
0 votes
0 answers
127 views
Determine the heading of a polygon by the longest side
I want to add direction arrows of polygons based on first drawn points of a polygon in QGIS. Heading of a polygon should be also added to a column heading of polygons layer. The solution should be an ...
0 votes
2 answers
113 views
List of numeric default values using SQL
Oracle 18c 10.7.1 EGDB: I have fields in feature classes and tables that have numeric default values. How can I get a list of the default values using SQL? I believe the default values are stored in ...
4 votes
1 answer
337 views
Changing number of default segments in buffer tool in QGIS
The "Buffer" tool of QGIS by default uses five segments per quarter circle. I want to change this default value to e.g. 50, so I don't have to select and replace the current value every time ...
2 votes
1 answer
1k views
Setting default value in QGIS field using QgsEditorWidgetSetup in PyQGIS
There are many questions like this but either they propose to implement a new method to update values or describe how to set default values for fields in GUI. I'm writing a QgsProcessingAlgorithm and ...
3 votes
0 answers
671 views
Editable default values in QGIS
In QGIS 3.22. For a vector layer, I would like to have a certain attribute (Field_A) be both editable by a user, AND automatically filled in by an expression for features that are not user-edited. ...
2 votes
1 answer
100 views
How to avoid default_value in field with ArcPy cursor (e.g. row[i]=None)
Some field in field_list has default_value=1 After executing the following code, such field is filled with the value «1», but normal fields are filled «Null». How could I avoid this for the field (...
2 votes
0 answers
90 views
Use aggregate to create a label from multiple shapefiles
I'm trying to fill one field of a line feature shapefile Cables (CAVI) with a default value that updates based on the start coordinate end the end one. The resulting field is a combination of the id ...
3 votes
1 answer
651 views
QGIS 3.14: default value
I have a question about "default value" based on expression. For exeaple, I have a layer in a GPKG, with 3 attributes: "Number" / "Letter" / "Roman". For my ...
2 votes
1 answer
129 views
Forcing choice for default value during data entry
Let's assume you have to perform different field surveys for different projects. For example, you have to log all sightings of birds for different projects. During data entry of the bird sightings I ...
0 votes
1 answer
803 views
Setting a default value in a QGIS field stored in geopackage
I try to create a vector layer with some field values which should use a QgsDefaultValue. It works fine if I use an in-memory layer (useGeopackage=False) but fails (no default value) if I use a ...
3 votes
1 answer
765 views
QGIS 3.10 Attribute form "default value" with current field values, but NOT update automatically
I want to have a default value from a current field (from another layer, but it is the same, when I use a current field from the current layer). And I DON'T want to update it automatically! After ...
2 votes
1 answer
635 views
Default Value for Field with Python Expression in Function Editor
I have a line shapefile in QGIS with several columns and the values for many of those columns could be automatically calculated and updated depending on certain other fiels. Now, I came across the ...
2 votes
1 answer
277 views
Saving calculated fields to reuse in other QGIS projects
I am using QGIS 3.4. I want to make attribute tables with many calculated fields that link to styles, and reuse the same structure for many projects. For example, when I draw a pipe (line vector), ...