You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugEither a bug report, or a bug fix. Let's hope for the latter!FeedbackWaiting on the submitter for answersstaleUh oh! Seems this work is abandoned, and the PR is about to close.
works good from Identify Result panel, but when the action run from the attribute table it doesn’t show the name of the field.
A workaround is using the field index:
layer = QgsProject.instance().mapLayer('[% @layer_id %]')
field_name = layer.fields().field([% @field_index %]).name()
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue.
Or, if you have any further questions, there are also further support channels that can help you.
BugEither a bug report, or a bug fix. Let's hope for the latter!FeedbackWaiting on the submitter for answersstaleUh oh! Seems this work is abandoned, and the PR is about to close.
Author Name: Alessandro Perego (Alessandro Perego)
Original Redmine Issue: 22120
Affected QGIS version: 3.4.8
Redmine category:actions
(tested on QGIS 3.4.8 on Windows 10)
Actions in field scope have three variables: field_index, field_name, field_value.
Field_name doesn’t work when actions run from attribute table.
For example the following python action (in field scope):
from qgis.PyQt import QtWidgets
expr = '"[% @field_name %]"' + ' = ' + "'[% @field_value %]'"
QtWidgets.QMessageBox.information(None, "[% @field_name %]", expr)
works good from Identify Result panel, but when the action run from the attribute table it doesn’t show the name of the field.
A workaround is using the field index:
layer = QgsProject.instance().mapLayer('[% @layer_id %]')
field_name = layer.fields().field([% @field_index %]).name()
The text was updated successfully, but these errors were encountered: