<html><head>

<meta name="Generator" content="Novell Groupwise Client (Version 14.2.1  Build: 124595)">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body style="font: 10pt/normal Segoe UI; font-size-adjust: none; font-stretch: normal;"><div class="GroupWiseMessageBody" id="GroupWiseSection_1558968793000_Kai.Behncke@ibbenbueren.de_A4138AB005DF00008D73746134313865_"><div>Well, it`s not an action, but I found a solution a home-made formular:</div><div><br></div><div><br></div><div>from qgis.PyQt.QtWidgets import QWidget,QLineEdit,QPushButton,QDialogButtonBox<br>from PyQt5.QtCore import *<br>from PyQt5.QtGui import *</div><div><br></div><div>def my_form_open(dialog, layer, feature):<br> geom = feature.geometry()<br> control = dialog.findChild(QLineEdit, "z")<br> #layer = qgis.utils.iface.activeLayer()<br> global myDialog<br> myDialog = dialog<br> global myFeature<br> myFeature= feature<br> buttonBox = dialog.findChild(QDialogButtonBox,"buttonBox")<br> #buttonBox.accepted.disconnect(myDialog.accept)<br> #Wire up our own signals.<br> buttonBox.accepted.connect(validate)<br> #buttonBox.rejected.connect(myDialog.reject)<br> # Wire up our own signals.<br> #pushButton.accepted.connect(validate)</div><div><br></div><div>def validate():<br> <br> qgis.utils.iface.messageBar().pushMessage("Autosave", u"Validalli : ")<br> layer = qgis.utils.iface.activeLayer()<br> #qgis.utils.iface.messageBar().pushMessage("Autosave", u"blba : "+z.text())<br> z = myDialog.findChild(QLineEdit, "z")<br> myFeature['z'] = z.text()<br> layer.updateFeature(myFeature)<br> <br> layer.commitChanges()</div><div><br></div><div><br></div><span id="GWSignatureSent" style="padding-right: 0px; padding-left: 0px; margin-bottom: 5px; display: block;"><span style="display: block;"><br><span style="font-size: 10pt; display: inline-block; -ms-word-wrap: normal;">
<div><!--GWSignatureRecordId 5C5442A6.STADT-IBB-DOM.STADT-IBB-PO.100.1646D74.1.7B.1 GWSignatureRecordId--><div>Mit freundlichen Grüßen<br>Im Auftrag</div><div><br></div><div>Kai Behncke<br>Geoinformation<br>Tel.: +49 5451 931-7125</div><div><br></div><div>E-Mail: <a href="mailto:kai.behncke@ibbenbueren.de">kai.behncke@ibbenbueren.de</a> </div><div><br></div><div>Rathaus II<br>Roncallistraße  3-5<br>1. Stock, Raum 105<br>49477 Ibbenbüren</div><br></div></span></span></span><span style="margin-bottom: 5px; display: block;"><br></span>

<meta name="Generator" content="Novell Groupwise Client (Version 14.2.1  Build: 124595)">

<div class="GroupWiseMessageBody" id="GroupWiseSection_1558955013000_Kai.Behncke@ibbenbueren.de_A4138AB005DF00008D73746134313865_"><span class="GroupwiseReplyHeader">>>> "Kai Behncke" <Kai.Behncke@ibbenbueren.de> 27.05.2019 13:04 >>><br></span><div>Dear users,</div><div><br></div><div>for a vector-layer I would like to produce an action, that shows the changed value in a formular.</div><div><br></div><div>E.G. I am editing a vector-point-layer, click on a point, the fomular is opening. I change a value (lets say <br>the formular-field "z" had a value "test" and I change it to "test2").</div><div><br></div><div>Then I start my developed action.</div><div><br></div><div>I tried for example: </div><div><br></div><div>----------------<br>from qgis.PyQt import QtWidgets</div><div><br></div><div>QtWidgets.QMessageBox.information(None, "Feature id", "feature id is [ $z ] '%Z%' '%z%' $z [z] $Z [Z] [%z%] [%Z%]")<br>----------------------</div><div><br></div><div>but I always get the "old" value "test" and not the formular-changed value "test2".</div><div><br></div><div>Has anybody an idea what I can do?</div><div><br></div><div>Thank you in advance, Kai<br></div><span id="GWSignatureSent" style="padding-right: 0px; padding-left: 0px; margin-bottom: 5px; display: block;"><span style="display: block;"><br><span style="font-size: 10pt; display: inline-block; -ms-word-wrap: normal;">
<div><!--GWSignatureRecordId 5C5442A6.STADT-IBB-DOM.STADT-IBB-PO.100.1646D74.1.7B.1 GWSignatureRecordId--><div>Mit freundlichen Grüßen<br>Im Auftrag</div><div><br></div><div>Kai Behncke<br>Geoinformation<br>Tel.: +49 5451 931-7125</div><div><br></div><div>E-Mail: <a href="mailto:kai.behncke@ibbenbueren.de">kai.behncke@ibbenbueren.de</a> </div><div><br></div><div>Rathaus II<br>Roncallistraße  3-5<br>1. Stock, Raum 105<br>49477 Ibbenbüren</div><br></div></span></span></span><span style="margin-bottom: 5px; display: block;"><br></span>
</div></div></body></html>