Questions tagged [actions]

An action is something that happens when you click on a feature (in QGIS). It can add functionality to a map, such as retrieving additional information about an object.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Error creating search action in Google [closed]

I'm new to QGIS. I want to create an action on a layer that allows me to open a Google search (photo attached). But I can't get anything to open, I tried a thousand ways but absolutely nothing happens....
Antía RA's user avatar
-2 votes
0 answers
23 views

QFIELD Custom action buttons

Is it possible to create your own preset action buttons in QFIELD, for example to speed up entering a point with a specified default values values when layer is in edit mode.
Rii Pii's user avatar
  • 411
1 vote
1 answer
40 views

PyQGIS layer action: Select features within buffer having the same field value

By means of a PyQGIS layer action, I am looking for a way to select all polygon features within a buffer polygon sharing a certain field value (e. g. provinces belonging to the same country) with the ...
ebcs's user avatar
  • 49
0 votes
1 answer
50 views

PyQGIS layer action: Add buffer from clicked-on feature as temporary layer using materialize

In the workshop material "QGIS Automation using Actions", the first example "1.1 Extract a Feature from a Layer" demonstrates how one can extract any country polygon by clicking on ...
ebcs's user avatar
  • 49
1 vote
1 answer
54 views

QGIS form action that allows the user to select a feature from another layer to set a field

I'm trying to create a QGIS action that will be used on an attribute form to get a value from a feature on another target layer and set a field on the current form. I have it mostly working (based ...
GammaGames's user avatar
3 votes
1 answer
155 views

Loading raster layer from URL in QGIS Attribute table

I have a map index polygon layer and want to load the raster from the URL filled-in attribute table using action. My attribute table is below: I had written in the action toolbar from qgis.utils ...
Paul P's user avatar
  • 103
2 votes
1 answer
89 views

QGIS: how to add an custom action to the keyboard shortcuts

I wish to add a keyboard shortcut to set a Map View to a specific scale. (Qgis3.3) So that i can link that shortcut to a button on my digitizer tablet. the python code should be something like iface....
glenndm's user avatar
  • 105
1 vote
0 answers
49 views

QGIS crashes when running Action to create new field

I made a layer style with a python action with following code : def add_field(field_name, layer, field_type=QVariant.Invalid, field_length=0, field_precision=0, value=None, from_field=False): if ...
dmjf08's user avatar
  • 1,233
2 votes
1 answer
85 views

QGIS: action from attribute table doesn't work correctly

My action From feature form: Result: From attribute table Result: It's a bug? Tested with QGIS 3.28.8, 3.28.9, 3.32.2
Giovanni's user avatar
2 votes
1 answer
138 views

AttributeError: 'QgsFieldComboBox' object has no attribute 'setPlaceholderText'

I have a QGIS action to copy field name to clipboard and display a message to the user when copied. I manage to get the field name but when I try to use QComboBox function setPlaceholderText() to ...
dmjf08's user avatar
  • 1,233
1 vote
1 answer
44 views

QGIS - actions: open a document - several polygons overlap

I inserted an action to a polygon layer in QGIS 3.28. The action window looks like that the action opens a document on my pc. Here you see the attribute table of the layer The action works, when I ...
Bertram's user avatar
  • 473
1 vote
0 answers
69 views

Identify clicked feature in external Python script for QGIS layer action

I use the action editor in QGIS to code an action, but I want to move the code to a PyQGIS script and import it to the action instead of directly typing it in the action editor. I changed this line ...
winnewoerp's user avatar
  • 1,508
2 votes
1 answer
171 views

Importing .py script to action editor using QGIS

I import a .py file like so: import sys sys.path.append('/foo/bar/boo/far/') # import foobar.py from target folder import foobar This line (simplified for sharing) works when the code is typed ...
winnewoerp's user avatar
  • 1,508
0 votes
1 answer
46 views

Add a QGIS custom (project level?) action linked to keyboard shortcut

Progressing along with my digitizing work mentioned here, I thought of an improvement to my method. In short: using a form, I modify a project variable which is then autofilled on new features. I ...
glenndm's user avatar
  • 105
1 vote
1 answer
72 views

Run feature action from canvas for overlapping polygons

I have a polygons layer for which I created an action, using a python script, that allows me to open a file related to the feature that I click on the canvas. However some of the polygons features ...
Michele Cordini's user avatar
0 votes
0 answers
68 views

Change path for QgsAction icon in PyQGIS

I added a QgsAction in my layer style, but when I share this style to other users, the path to the icon is written in absolute. I watched QgsAction doc (here) and it doesn't seem to be a setIconPath(),...
dmjf08's user avatar
  • 1,233
0 votes
1 answer
391 views

In ArcGIS Online, how to configure layer actions to use a map to filter a table for a chart?

In ArcGIS Online, I've created a dashboard. In the Dashboard, there is a webmap. I also have a chart. It IS possible to use the map to filter the chart, using Layer Actions (configure gear, layer ...
Mox's user avatar
  • 1,036
3 votes
1 answer
120 views

QGIS actions with remote data

I try to share several images through an action from QGIS. The images are in my PC and I need that other users can see them in their machines (we are in a local network). The images are geotagged in ...
Oscar Soto's user avatar
3 votes
1 answer
598 views

Implementing PyQGIS code to action when pressing button in QGIS

I am interested in the creation of actions in QGIS 3.22. I have a Python script that multiplies the numbers from the fields "wert1" and "wert2" and writes them to the field "...
cc_schr_gis's user avatar
3 votes
1 answer
243 views

Programmatically add QgsAction to Attributes form using PyQGIS

Context I am developing a QGIS plugin using QGIS 3.22.11-Białowieża. One of the functions is to add a layer to the map and format the fields in the attributes form. I want to avoid developing a custom ...
K Whitehead's user avatar
1 vote
1 answer
100 views

Setting QAction with no associated buttons in PyQGIS

I have a function that sets up some QActions and sets some keyboard shortcuts: def set_num_edit_shortcuts(self): self.right_next_action = QAction(parent=iface.mainWindow()) self....
tbob's user avatar
  • 594
1 vote
1 answer
134 views

Placing plugin or action in submenu using PyQGIS or PyQT

I am trying to place a plugin into a submenu of "Vector". In this case "Geoprocessing Tools". When I use: iface.addPluginToVectorMenu('Geoprocessing Tools',action) or: iface....
JAS's user avatar
  • 455
3 votes
0 answers
136 views

Action pop-up for Photo in QGIS 3.22.5 not working with Windows 11?

I am attempting to use the action feature for photos described in Using QGIS and QField for Field Data Collection - https://www.line-45.com/post/using-qgis-and-qfield-field-data-collection. This ...
Anomalous Exploration's user avatar
3 votes
1 answer
446 views

Relative Path when linking a pdf to a feature

I'm trying to link PDF to features in QGIS. I do that by putting the path in a column named "PDF" and execute the default open action or a generic action command. So basically I don't have ...
Wicowan's user avatar
  • 33
1 vote
0 answers
101 views

How to open a .pdf file with a partially matching name in the QGIS open file action

I have an attribute table where a field called "IDENT" contains a unique string for each measurement site. Using the QGIS action open - open file I managed to open a PDF in a subfolder if ...
sdb's user avatar
  • 75
1 vote
1 answer
279 views

PyQGIS automatically change raster palette using Action

I have created an Action that downloads a map sheet. It appears as a 'Multiband Colour' but I need it to appear using 'Paletted/Unique values'. I assume I need to add QgsPalettedRasterRenderer within ...
Mac Maclean's user avatar
2 votes
1 answer
148 views

Determining source of QGIS Action [closed]

I'm new to QGIS, using v 3.18. I would like to write an action that is triggered when a user inserts a point on a layer. For example. I have a point layer named testLayer. In the properties dialog,...
Robotuner's user avatar
  • 394
4 votes
1 answer
459 views

QGIS - Python Action Error

I am using QGIS 3.18.1-Zürich and I am trying to create a Python action. Although I have installed the required packages, I get an error as shown below. Traceback (most recent call last):   File "...
Therru's user avatar
  • 105
0 votes
1 answer
192 views

QGIS action loading layer in GPKG

I have a kind of "vector catalog" in a GPKG. It's different rectangles with an attribute called "name of the layer". In the same GPKG, I have all the different layers. I'm trying ...
katagena's user avatar
  • 1,624
3 votes
1 answer
393 views

QGIS action on layer scope - reference to layer

In QGIS I would like to create an action of type "python" on layer scope, aim of this simple action is to print out the selected feature of the layer the action is defined on: My simple ...
Jochen Schwarze's user avatar
1 vote
1 answer
155 views

Opening PDF w/ action based on variable crashes QGIS

I found this script which I modified a bit to open a pdf based on a page number given in the attribute list. Upon trying to execute the action it works just find but QGIS (3.4.15) is crashing! Any ...
simon's user avatar
  • 21
3 votes
0 answers
180 views

QGIS / QField: nested relational value form QGIS save refused QField

The Field Survey project should have been operational for two days already, but I have a major problem. After having succeeded in nested two fields in the form (relational value), we realize that the ...
cocro's user avatar
  • 31
1 vote
0 answers
124 views

Loop does not run in QGIS action

I tried to create a QGIS action in order to refresh several materialized views at once. for that I wanted to execute a simple loop in my action in order to recover the database where the view will be ...
psycho33200's user avatar
2 votes
1 answer
635 views

QGIS Action to update several fields

I would like to update one ore more fields of my attribute table on demand (f.e. using a QGIS Action) with one simple click. For now I have to open attribute table or the layer properties, start field ...
MartinMap's user avatar
  • 8,284
0 votes
1 answer
422 views

Opening folder using QGIS action with Total Commander

Is it possible to open a folder, with QGIS' "run feature action", using Total Commander instead of explorer? Something like: explorer [%'C:\myfolder'%] needs to be C:\totalcmd\TOTALCMD.EXE [%...
Arthur's user avatar
  • 69
2 votes
1 answer
832 views

Open specific page of a PDF using QGIS actions

Can anyone help me with the syntax to open a .pdf-file at a specific page using a QGIS action? For example, a 50 page pdf has the information of use at page 8, so invoking the action in the QGIS Map ...
Simon Hume's user avatar
1 vote
0 answers
48 views

Action on filtered objects QGIS

I have got a point layer with about 1000 points. These point has a rule based symbology. So far so common. In this layer I have also some actions implemented. If I unselect some rules, that only the ...
holli's user avatar
  • 59
2 votes
1 answer
150 views

Can I make an Action on QGIS to open a file(.tiff) on an attribute table directly to Photoshop

Here is the sample file image to be opened. Is there's a way to open an image file (.tiff) on the attribute table using an image viewer like Photoshop. Can I create an Action on QGIS so that it ...
potski's user avatar
  • 21
1 vote
0 answers
184 views

Is there a way to maintain map tips and/or actions in an exported PDF using QGIS?

I am working on a project that displays the locations of a group's projects in a city. I have it set up now so that map tips shows the name of the project and location when you hover over the point. I ...
Matthew Corona's user avatar
0 votes
0 answers
429 views

QGIS Action Open Image

Can someone advise me where i might be going wrong when trying to open an Image in a Network folder using the Action function in QGIS I have a point dataset with a column that has the image location ...
Simon Hume's user avatar
1 vote
1 answer
111 views

QGIS Action on layer postselect object

I'm using QGIS 3.10 LTR. In my project I have a point layer (location of pictures) with 3 different actions (open file, open folder, open html). This works fine for me. To this layer I add time by ...
holli's user avatar
  • 59
2 votes
1 answer
643 views

Action to directly export selected features as GPX

I would like to directly export selected tracks of a line layer as gpx. The common way is: Select the line-layer select the tracks for export right-click on the layer -> save selected features as.....
MartinMap's user avatar
  • 8,284
0 votes
1 answer
104 views

Automatically update field when value in related table is changed

i have set up a 1:n relation in QGIS. The parent layer contains trees (point geometry) and some basic informations about. The related table contains measurements which should be carried out to keep ...
sn1ks's user avatar
  • 2,962
2 votes
1 answer
2k views

Creating an QGIS Action to change a field value from yes to no

So I'm working on a project where I have to check the classification of a bunch of points in a QGIS project. I have created a styling which means I can perform this task with visual inspection. I have ...
Alex Hersfeldt's user avatar
1 vote
0 answers
484 views

OpenLayers how to show long lat after click to map and make visible until next click to map?

I found this code for make visible long lat coordinate after moving the mouse over the map. And I rewrite to HTML page with newest OpenLayers version. I would like to show this long lat coordinates ...
Davidcz's user avatar
  • 113
1 vote
0 answers
24 views

Making Open Action only enabled on visible polygons

I have a shape with polygons with Date field (YYYY-MM-DD). The shape is displayed as Categorised according to year (substr("Date",1,4) and I can switch polygons on an of according to year. I have an ...
Pogli's user avatar
  • 11
1 vote
1 answer
54 views

Apply transparency to a raster layer by using actions [closed]

i have a specific action to load an raster layer by clicking on it, however i need to know if is possible to open that specific file and automatically apply a style. My idea is when someone click and ...
Ricardo Amaral's user avatar
3 votes
1 answer
424 views

QGIS Actions in QField

I am creating an action in QGIS, which opens a link from an attribute. Is it possible to open such a link in QField (Android App)? Or is there any other way to open links from the attribute table in ...
Łukasz Stempek's user avatar
2 votes
0 answers
316 views

Add Action (-Button) to Attributes Form (QGIS)

Is it possible, to simply add a Action to a Attribute Form (Drag'n Drop Designer)? I know, I could use the QT-Designer and Python, but I'm looking for a fast and simple way without python knowledge. ...
MartinMap's user avatar
  • 8,284
6 votes
1 answer
2k views

Editing feature geometry in action using PyQGIS

I have fieldwork photos stored in a vector layer, geotagged from EXIF GPS data. Sometimes the GPS is off, or even missing, and I need to move their position manually. Unfortunately, the Advanced ...
Houska's user avatar
  • 7,948