Questions tagged [default-value]
The default-value tag has no usage guidance.
33
questions
15
votes
4
answers
10k
views
Setting default value for attributes in shapefiles using QGIS
In QGIS 2.14.6 I would like to define a default value for an attribute in a shapefile (or spatialite layer as well) which is applied if the user doesn't explicitly sets the value.
Is there a way to ...
13
votes
3
answers
4k
views
Setting default value in QGIS field
I would like to add in a layer's field a default value. I mean, every time a new feature is created, that field would be automatically filled with the default value.
In my case the default value would ...
10
votes
2
answers
2k
views
Setting QGIS to "show feature count" always when layer is loaded?
I am using QGIS 3.
I know that i can right click the layer and check the "show feature" option but is it possible to show enable this function by default when any layer is loaded ?
I know that we ...
7
votes
0
answers
379
views
Change default label font for styling
Where can I change the default labeling font "MS Shell Dlg 2" to a different one?
I don't want to change the default layout font (Options --> Generel Settings)
Maybe there is a solution to use the ...
6
votes
3
answers
2k
views
Creating QgsFeature with default attributes using PyQGIS
I have a polygon layer loaded from PostGIS database. This layer has a default value for the first column. I can create a new feature set that attribute to some predefined value with:
newFeature = ...
4
votes
1
answer
158
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 ...
3
votes
1
answer
417
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 ...
3
votes
2
answers
877
views
Remove all default values on multiple feature classes
I would like to remove default values from all fields used by all feature classes in an SDE geodatabase. I do not see a geoprocess for removing the default value, only setting it. So I am trying to ...
3
votes
1
answer
637
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 ...
3
votes
0
answers
406
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.
...
3
votes
0
answers
193
views
Weather data as attribute value in QGIS
I'd like to define the default value for a field in QGIS using OpenWeather API request.
We use QField for outdoor data collecting, and some of the actual weather conditions are important for us. I've ...
2
votes
2
answers
992
views
Insert (or Update) Cursor setting value to None not honored when field has a default value
To set a field to null, the InsertCursor or UpdateCursor is setting the value to None.
Here is a sample for the UpdateCursor:
with arcpy.da.UpdateCursor(test_fc, ['SERVICEINDICATOR'], """"OBJECTID" =...
2
votes
1
answer
108
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 ...
2
votes
1
answer
620
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 ...
2
votes
1
answer
197
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), ...
2
votes
1
answer
472
views
QGIS geoprocessing scripts, default values for field names
In QGIS geoprocessing scripts, default values must be provided for input numbers and strings, according to http://docs.qgis.org/2.8/en/docs/user_manual/processing/console.html#creating-scripts-and-...
2
votes
2
answers
791
views
Use previous entry as default in attribute table
I have a vector layer that I add observations to by identifying features in georeferenced rasters (images). One of the attributes I want to assign to the feature is the image name (which I currently ...
2
votes
1
answer
496
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
2
answers
1k
views
Assigning Default Value Using ModelBuilder?
Task: add several new fields to a feature class table and assign a default value to one of the fields.
Software/Environment: Using ArcMap 10.2 (Advanced License) and Python 2.7. Data is stored in ...
2
votes
1
answer
2k
views
Assignment of defaults to field not working
I am using ArcGIS 10.2.2 for Desktop.
I have assigned default values to some fields in a feature class, which is sitting in a file geodatabase.
I used the "Assign Default To Field Tool", which ...
2
votes
1
answer
81
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
81
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 ...
1
vote
1
answer
300
views
Default expression won't write to database
Made this expression and put it in the defaults value box.:
CASE
---cardinal
WHEN ("CATCAM" = '1')THEN'2,6'
WHEN ("CATCAM" = '2')THEN'2,6,2'
WHEN ("CATCAM" = '3')THEN'6,2'
WHEN ("CATCAM" = '4')THEN'...
1
vote
1
answer
167
views
How to get features of another point layer when geomequals ? (Using Default Values in Attributes Form Qgis 3.2.1) [closed]
I have 2 different point layers with attributes fields as shown in the picture below. They both have a different amount of features. Now i want that all features of layer B gets filled with some ...
1
vote
1
answer
445
views
NDVI error in ERDAS
I have created a NDVI image from Landsat 7 data using ERDAS (veg_NDVI.gmd). This model was already in ERDAS 9.3. After creation the final output visually highlighting vegetative areas but the value ...
1
vote
0
answers
373
views
How to set a default attribute value based on the feature being created
This question expands on, and updates for QGIS 3, the answers found here.
I have a layer with attributes called "Name" and "Label". I would like to set to default value of "...
1
vote
1
answer
49
views
ArcPad Studio default values only show up in ArcPad when I make new points
I am using ArcPad to do a habitat inventory (default value= "N/A") and invasive species survey (default value= "Absent") on a grid of preset points (the points are a shapefile). The default values ...
1
vote
1
answer
1k
views
Maintaining default value for fields in ArcGIS online map / feature service
I have an enterprise geodatabase within which there are several feature classes that contain subtypes and domains. A web map has been created from this geodatabase on ArcGIS Online and it is used for ...
0
votes
2
answers
74
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 ...
0
votes
1
answer
650
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 ...
0
votes
0
answers
106
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
0
answers
151
views
Default values from different layer in QGIS 3 - kind of spatial join
Is there a way to set the default value in QGIS 3 Properties - Attribute Forms based on the values of a different layer.
E.g. I set a point and the fields for e.g. country and height are filled out ...
-1
votes
1
answer
2k
views
Subtypes and default values in ArcGIS Online
I am trying to create subtypes with default values for ArcGIS Online. So far, I've not gotten success when published to ArcGIS Online. Is it true to assume that ArcGIS Online doesn't support subtypes ...