I'd like to use an integer parameter that represents a percentage and thus cannot be higher than 100.
First I hoped type "percentage" would perfom some checking of that, but it doesn't.
Than I tried to check that maximum value by code, but apparently all comparisons like <, <=, >, >= will not work. I guess, that is because of "Confluence accepts this type, but treats it in the same way as 'string'."
Has anybody a suggestion, how to overcome this?
We use Confluence 6.12.
Thanks for any help!
After posting this Question, there was the following link under "Related Community content":
I adopted the answer of @Davin Studer (thank you, Davin!) and that solved my problem.
It now works like that:
#if ($generalUtil.convertToInteger("$percent")>100)
#set($percent=100)
#end
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.