Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Bookmarks inbookmarks:mine
inbookmarks:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options user 9839

Fields, also known as attributes, contain information about features.

5
votes
Virtual fields are a pure QGIS concept. The data provider (your database) does not know the slightest bit about their existence. Virtual fields are just put "on top of" the real data, their values are …
answered Oct 20 '15 by Matthias Kuhn
2
votes
You have different possibilities String manipulation toint( substr( tostring( 16011234 ), 5, length( tostring( 16011234 ) ) - 4 ) ) And for your second question: Take the substring starting at …
answered Apr 29 '15 by Matthias Kuhn
3
votes
There are basically two problems with the script you posted. The feature's attributes are not initialized. So the feature itself does not have any attributes (although the provider has). With other …
answered Nov 20 '15 by Matthias Kuhn
18
votes
Yes, this functionality is called virtual fields. Open the field calculator and check the "virtual field" checkbox. The value will then be updated (or rather it is recalculated every time it is reque …
answered Jun 5 '16 by Matthias Kuhn
17
votes
Form layout You have the following methods to do this: QgsVectorLayer.setEditForm( '/path/to/your/ui/file' ) to provide a UI file and QgsVectorLayer.setEditFormInit( 'python.Function' ) to provide a …
answered Jul 30 '13 by Matthias Kuhn
25
votes
Shapefiles have a limitation of maximum 254 characters per field (See switchfromshapefile.org). If you need more than that you will need to switch to a different format. If you don't know which file …
answered Mar 25 '18 by Matthias Kuhn
9
votes
You are right, that you don't need to call commit if you work on the dataProvider directly. However, this will also commit every update immediately, leading to more I/O overhead (often decreased perfo …
answered May 19 '14 by Matthias Kuhn
3
votes
You could achieve this based on the QGIS Combo Manager Just create your own filter for the fields in a subclass of FieldCombo. The following code is untested (literally), so please bear with me if th …
answered Apr 1 '14 by Matthias Kuhn
2
votes
You can open the attribute table, toggle layer editable (if not yet done) open the field calculator and check Create a new field, give it a type / name and use an expression to fill it with values bas …
answered Apr 3 '14 by Matthias Kuhn
3
votes
Yes, it is possible even without any additional plugins. You have to enable "auto open feature form" to open the form automatically when clicking with the "identify" map tool. You have to configure …
answered Oct 6 '15 by Matthias Kuhn
5
votes
QGIS can do that without any Python code as well. The following excerpt is from the QField documentation. Groups can be hidden based on an expression. This is useful when certain attributes are o …
answered Apr 26 '19 by Matthias Kuhn
6
votes
It's not completely clear which datatype the attribute should have. I am assuming string here (but it could be int or double among others as well). The code below also has been simplified and shorten …
answered Oct 3 '17 by Matthias Kuhn
5
votes
With the next release QGIS 2.14 this will be fixed. If you have python knowledge, it should be straightforward to port the code linked to above to a small python snippet that copies joins and virtual …
answered Feb 5 '16 by Matthias Kuhn
6
votes
What you want is available starting from QGIS 2.6 and is called Virtual Field. Just create a new attribute, select "Virtual Field" and insert the expression used to calculate the new column. For your …
answered Sep 8 '14 by Matthias Kuhn
8
votes
Since QGIS 2.18, go to the layer properties / field properties and set an expression (@project_filename in this case) as the default value. https://www.qgis.org/en/site/forusers/visualchangelog218/ …
answered Nov 9 '16 by Matthias Kuhn

15 30 50 per page