[QGIS-Developer] QgsProcessingParameterField with parent layer based on a QgsProcessingParameterString

Tejas L tejvan at live.com
Tue Jun 25 09:37:31 PDT 2019


Hello folks,

I am writing a processing script where I need to select multiple fields from a loaded project layer. Normally I would use QgsProcessingParameterField and a parent QgsProcessingParameterFeatureSource to directly select the parent layer.

However, in my use case I can only specify a substring of the parent layer name.

e.g. Assume that the layers loaded in the current project are:

xyz_proj1
xyz_proj2

I need a processing algorithm which takes two parameters:
   1. substring: which is a layer name substring:  e.g. "proj1"
   2. field selector: which must be based on the fields of "xyz_proj1"

How could I go about doing this?

Thanks,
Tej


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190625/a48d841a/attachment.html>


More information about the QGIS-Developer mailing list