[Qgis-user] Toggle Attribute

Richard Duivenvoorde rdmailings at duif.net
Mon Nov 23 23:55:23 PST 2020


Hi Mike,

I did some fiddling with the 'Create default actions' that you can load.

One thing that was not obvious to me, is that you need to set the 'Action Scope'. So be sure it has 'Feature Scope'(or Canvas scope?) if you want to click somewhere in the mapcanvas.

With me selecting one of the possible actions in the Actions button in the toolbar makes it color change from blue to green.

Then there is the option to set some kind of order in the 'Actions'-list of the layer.

For what I see there is no need to use the identify tool. Only if you want the actions to show up in the Identify Results as a clickable Actions button (I think(!) it has to do with the 'Field'-scope).

But it's not very clear to me how this all works together to be honest.
There is some doc here:

https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#actions-properties

There is also a 'lesson' in the Training Manual:

https://docs.qgis.org/testing/en/docs/training_manual/create_vector_data/actions.html?highlight=actions

HTH & Regards,

Richard Duivenvoorde



On 11/24/20 2:21 AM, Mike Flannigan wrote:
> 
> Thank you.  I did get an Action to operate today.  My action also
> uses a Google Maps link.
> 
> I can click on "Identify Features", which opens a "Identify Results"
> panel.  Then I can click on a feature in that layer, open Actions
> in the "Identify Results" panel, and click on the action, which
> runs the action.
> 
> Now I'm trying to make the action more accessible.  Am I correct
> in my assumption that the button just to the right of "Identify Features"
> should list my Action in the dropdown list?  So list stuff like this:
> http://www.mflan.com/temp/action1.jpg
> Figure 5 was taken from:
> https://www.geodose.com/2018/04/qgis-tutorial-how-to-create-action.html
> 
> When I click on that little black triangle on the button just to the right
> of "Identify Features" it shows an empty, white box.  When I click on the
> button is doesn't do anything.  When I hover over the button it says
> "no action selected".
> 
> Ideally I would like for the action to run if I just click on the feature.
> 
> 
> 
> Mike
> 
> 
> On 11/23/20 2:00 PM, qgis-user-request at lists.osgeo.org wrote:
>> Hi Mike,
>>
>> Just create an action with something like this to see it in action:
>>
>> https://www.google.pt/maps/@[% @click_x %],[% @click_y %]
>>
>> This will open google maps at the place you clicked. If you want to get
>> something from the action called, you have to capture its output (and
>> return the right value from your script).
>>
>> As Richard said, start with the default actions and you will see
>> different kinds of things that can be done with actions. Capturing the
>> clicked X,Y is straight forward.
>>
>> Jorge
> 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list