[Qgis-user] Model desinger / enum input question
Bo Victor Thomsen
bo.victor.thomsen at gmail.com
Tue Jun 10 03:35:40 PDT 2025
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
More information about the QGIS-User
mailing list