On Mon, Nov 7, 2022 at 11:59 AM Andreas Neumann wrote:
>
> Hi Ale,
>
> Thanks for the hint!
You're welcome!
the formScope adds another feature: the "form" feature which
represents a virtual feature with the values taken from the current
form status.
>
> With
>
> expContext.setFeature(form.featu
Hi Ale,
Thanks for the hint!
With
expContext.setFeature(form.feature())
it seems to work.
I was assuming that adding the formScope would also add the feature
context ... but apparently not.
Now I can continue adding the more complex expression.
Thank you for your help!
Andreas
On 2022-1
You need to set the feature if you want to access the feature fields.
QgsExpressionContext::setFeature( const QgsFeature &feature )
If you want the form feature values you need to use the current_value
or the current_feature functions.
Regards.
On Mon, Nov 7, 2022 at 11:27 AM Andreas Neumann vi