Any one have any insight of what could be wrong there? I could not find a lot of public examples using d2:condition so I may have done a basic mistake here.
Thanks !
Martin
···
**Martin Van Aken - **Freelance Enthusiast Developer
I think it is the parenthesis within the condition that breaks the evaluation. When I would always argue for adding the parenthesis for the clarity of reading the expression, I think you are in luck here - if you remove all the parenthesis your numerical operators will be applied in the same order even if you remove them.
Please consider registering an issue on the parenthesis problem if it turns out to be the source of the problem.
Best regards
Markus
···
**Martin Van Aken - **Freelance Enthusiast Developer
Just tried, it works! This will help me & more importantly some users a lot!
Long history of being bitten by operator priorities, so I tend to go the “non ambiguous way”. Are the operator priorities documented somewhere (I expect the “standard math ones”, but better safe than sorry)
Thanks for the quick answer - I’ll fill the Jira. A very small fix would be to add this to the doc - if the doc is on GitHub I’ll gladly submit a PR.
Martin
···
On Wed, Feb 7, 2018 at 9:05 AM, Markus Bekken markus@dhis2.org wrote:
Hi Martin,
I think it is the parenthesis within the condition that breaks the evaluation. When I would always argue for adding the parenthesis for the clarity of reading the expression, I think you are in luck here - if you remove all the parenthesis your numerical operators will be applied in the same order even if you remove them.
Please consider registering an issue on the parenthesis problem if it turns out to be the source of the problem.
Any one have any insight of what could be wrong there? I could not find a lot of public examples using d2:condition so I may have done a basic mistake here.
Thanks !
Martin
–
**Martin Van Aken - **Freelance Enthusiast Developer
On Wed, Feb 7, 2018 at 9:05 AM, Markus Bekken markus@dhis2.org wrote:
Hi Martin,
I think it is the parenthesis within the condition that breaks the evaluation. When I would always argue for adding the parenthesis for the clarity of reading the expression, I think you are in luck here - if you remove all the parenthesis your numerical operators will be applied in the same order even if you remove them.
Please consider registering an issue on the parenthesis problem if it turns out to be the source of the problem.
Any one have any insight of what could be wrong there? I could not find a lot of public examples using d2:condition so I may have done a basic mistake here.
Thanks !
Martin
–
**Martin Van Aken - **Freelance Enthusiast Developer