There are 2 things that I think Mendix can improve on:
if (A)
show A-content;
if (B)
show B-content;
if (C)
show C-content;
Is much less optimal than doing
if (A)
show A-content;
else if (B)
show B-content;
else
show C-content;
This cannot be done in Mendix’s front end. You’ll always have to compute every visibility statement, even if they could be nested.
We need a way to nest what is shown in a screen/snippet.
The second thing is that you cannot directly have a visibility condition if the user does NOT have a role.
If you only want to show some content if the user isn’t an Admin, you cannot do it in a low-code manner.
To do that you’ll have to have a microflow, fetch the current user roles and check if admin is not one of them and then return false (Or some similar approach)
Let me know if this is not the case.
regards, Fabian
Sorry, my ideas weren’t very organized. Let me rephrase:
There are 2 things that I think Mendix can improve on:
if (A)
show A-content;
if (B)
show B-content;
if (C)
show C-content;
Is much less optimal than doing
if (A)
show A-content;
else if (B)
show B-content;
else
show C-content;
This cannot be done in Mendix’s front end. You’ll always have to compute every visibility statement, even if they could be nested.
The second thing is that you cannot directly have a visibility condition if the user does NOT have a role.
If you only want to show some content if the user isn’t an Admin, you cannot do it in a low-code manner.
To do that you’ll have to have a microflow, fetch the current user roles and check if admin is not one of them and then return false (Or some similar approach)
Let me know if this is not the case.
You’re totally right. My ideas were not very organized when I wrote this. I’ll edit this post now.
Best regards,
João
Visibility is a binary thing. Something is visible or not and a condition is true or not. There is no in between. You can add a condition and if it is true, visibility is turned on. Otherwise it is turned off.
How would a “if-then-else” statement change something?