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
1
vote
1answer
40 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 ...
0
votes
0answers
54 views

Automation/action/scripts in QFIeld

So, from this QField -- using Python init functions (couldn't find anything else but might have missed something obviously) I would like to know if there's a way to add actions or automations on ...
2
votes
1answer
58 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,...
4
votes
1answer
76 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 "...
0
votes
1answer
45 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 ...
2
votes
1answer
64 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 ...
0
votes
0answers
32 views

Running script within QGIS action crashes

I am running the following script (got it from QTDesigner and just slightly modified it) in a QGIS action which makes it crash altough the script runs totally fine within sublime for example. Any ...
1
vote
1answer
44 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 ...
3
votes
0answers
79 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 ...
1
vote
0answers
44 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 ...
0
votes
1answer
85 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 ...
0
votes
1answer
108 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 [%...
2
votes
1answer
187 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 ...
1
vote
0answers
22 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 ...
2
votes
1answer
93 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 ...
1
vote
0answers
69 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 ...
1
vote
0answers
68 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 ...
1
vote
1answer
56 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 ...
2
votes
1answer
200 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.....
0
votes
1answer
48 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 ...
1
vote
1answer
356 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 ...
1
vote
0answers
41 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 ...
1
vote
0answers
23 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 ...
1
vote
1answer
45 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 ...
3
votes
1answer
222 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 ...
2
votes
0answers
129 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. ...
4
votes
1answer
559 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 ...
3
votes
1answer
321 views

Using Layer Actions on overlapping polygons with PyQGIS

I have a file with many overlapping polygons that outlines different datasets. In the attribute table I have an absolute Windows path to mapinfo tab files. I would like to define an action on the ...
1
vote
0answers
52 views

Open a URL in QGIS from form (or using actions) in Linux

Does anyone know the correct instructions to open a URL as an action (or from a form) using Arch Linux? In Windows it's as simple as using 'Open' in the action type, and then [%'field containing URL'%...
3
votes
1answer
137 views

QGIS Action commands in 3.8

In earlier versions i was able to open pdf files by using an action command like this one: cmd /c [%path%] this function no longer works on version 3.8. Any ideas why and what an alternative could ...
5
votes
1answer
279 views

Error from open image action in QGIS

I am using QGIS 3.6. By clicking on a polygon I want that an image associated to this polygon appears (as a pop-up window e.g.). The path for the pics are stored in the attribute table (string field)....
2
votes
0answers
56 views

Adding action to map in QGIS when link to actions menu item is missing?

I am running qgis 3.8.0 zanzibar on ubuntu 18.04. I am trying to set a hyper link on a point on the sample map (Alaska). A casual perusal tells me that I should set up an action. https://www....
0
votes
2answers
681 views

QGIS how to fill the fields instantly and automatically when creating an entity

I have a polygon layer, I want to fill the fields automatically each creation of a polygon. Knowing that there is a spatial relationship (intersection, contain ...) between my polygons and other ...
3
votes
2answers
939 views

Making button clickable to perform function in Leaflet?

I am trying to create buttons that will initiate a flyTo. I can click the buttons on the page but they do nothing action functions: <script> function Action(){ map.flyto([43.372000,...
3
votes
2answers
5k views

Creating a multiple select dropdown list in QGIS?

Is it possible to create a multiple select dropdown list/select widget in QGIS which links to a separate txt file? I want to collect species lists for different locations in qfield but do not want ...
3
votes
1answer
452 views

Removing “duplicate feature” button from QGIS attribute table

when I enable action buttons on particular layer I always get two additional buttons in edit mode: duplicate feature and duplicate feature and digitize. Is there any way to remove them, because they ...
3
votes
1answer
494 views

Open multiple files at once by QGIS actions buttons

I'm planning to put into my table a column with folder path, so it will be easy to open a folder with needed files in attributes table. Now I'm wondering if I could open not the folder, but all files ...
5
votes
1answer
494 views

QGIS actions: copy to clipboard some attributes

When I click on "execute action entity" =>Copy to clipboard a preconfigured set of attributes of my layer. Here's what I've done so far: Open the Layer Properties dialog and head over to the Actions ...
0
votes
1answer
164 views

QGIS hyperlink to server location- working in 3.0 but not 2.18.20?

This is not necessarily a pressing issue, as there is a workaround, but it has piqued my curiosity about how QGIS manages hyperlinks through its 'Action' functionality. Please feel free to correct my ...
1
vote
1answer
166 views

QGis 2.18 Actions window does not display 'Actions Properties'

I have installed QGis 2.18.19 64bits in Windows 7. My problem is when I open the layer properties actions window, I do not see the menu Action Properties. Apparently it should be there according to ...
1
vote
1answer
63 views

Action ran severall times when clicking on overlapping features

I have a layer of points and I associated a Python action to that layer which basically opens a url in the embedded QWebView. This works well. The issue I am facing is that if I zoom out and click ...
3
votes
1answer
201 views

Creating link between geopackage and pdf

I'm trying to create a link between geopackage and a folder that contains pdf files. There are points with the same name and they should open the same pdf. I want name 100 to open 100.pdf. Name 101 ...
1
vote
1answer
200 views

How to make a clickable label in qgis from an excel sheet?

I have location data in excel sheet where each label has corresponding data file for each financial year. I want it that when i click on a label, years pop up, and when i click on that year, its ...
2
votes
0answers
97 views

Action opening DWG file in Intellicad using file name in a attribute table

I have tried numerous variations in creating an action to open a DWG file in Intellicad after selecting a specific row in a table in QGIS. I am quite frankly stumped at this point. I have the DWG ...
3
votes
2answers
1k views

How to add a new feature to a layer

I have a table with three attributes [field1, field2, field3]. I'm trying to insert a new feature to this table by defining field2 and field3 only. lyr = QgsMapLayerRegistry.instance().mapLayer('...
1
vote
0answers
356 views

Get id of last added feature in qgis python action [duplicate]

I created a python qgis action that open the dialog form so the user can add a new feature. maintenance_lyr = QgsMapLayerRegistry.instance().mapLayer('od_maintenance_event20180212171049766') ...
4
votes
1answer
3k views

Creating QGIS copy-paste features between two layers using PyQGIS? [duplicate]

i want to create a QGIS action which copies features between two points layers using pyqgis . i have read How to create a QGIS action which copies features between layers? and i try to use this code: ...
2
votes
1answer
292 views

QGIS Action which load .asc

I have a grid layer (lidar_cortina) with "NAME" and "percorso"(path) coloumns: I'm trying to write an QGIS action that loads file .asc from a grid layer. qgis.utils.iface.addRasterLayer("[%percorso%]...
1
vote
0answers
65 views

Initiate field value before adding new feature

I have two layers: Chambre(obj_id) Ouvrage(obj_id, fk_chambre) The attribute Ouvrage.fk_chambre is referencing the attribute Chambre.obj_id. I'm trying to create an action on the Chambre layer that ...
2
votes
0answers
487 views

Open file from QGIS and search for text within it

I have a lot of data associated with a layer in QGIS. Each individual feature has its own information associated with it - but this information is within a number of different PDF files. I have ...