Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Arithmetic operators and comparison in Label Expression #1064

Open
mjardemalm opened this issue Aug 12, 2024 · 0 comments
Open

Comments

@mjardemalm
Copy link

Description

In the current implementation conditional display of values are evaluated to empty or not empty. E.g. '1=1' will evaluate to true as well as 1=2. Arithmetic and comparison operators in Label Expressions would add some really nice-to-have possibilities to a already great feature.

My use case is solely the comparison operators. Lets say I have properties on concepts that only should appear in the label up to a specific level where the level could be different from time to time. The deciding property could be "Level" and the value between 1 and 4. In the model itself I have a property named "Display level" set to 2. In that case I would like to decorate the concept with a prefix if the level is either 1 or 2. The label expression I would like to use then could be

${if:${property:Level <= $model{property:Display level}:${property:MyPrefixProperty} }$name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant