Hi list -

I'm designing a processing model, where i use a "Enum" input. When accessing this variable in a "Calculate Expression" algorithm in the model, the result will be an ordinal value - not a text - from the enum.

Example:
I have an enum named "animal" defined with 3 animal names like "Gorilla","Snake","Elephant". If the user choose "Snake" the variable @animal contains the number "1" instead of "Snake". How do I get the textual representation of the enum instead of the ordinal ?

I'm aware I can use a CASE... WHEN in the expression. But it will be cumbersome for enums with many values.

--
Med venlig hilsen / Best regards

Bo Victor Thomsen

_______________________________________________
QGIS-User mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to