Trigger visibility through "if-then-else" column

Hey guys,

I want to display a component based on the cases triggered through an “if-then-else” column.

Implementation goal: Component should be displayed for the first three cases and hidden for the else-case.

image

Unfortunately this doesn´t work. Any cue?

That looks like it should work to me.
You are using AND in your visibility setting, which means that both conditions need to be met.
Is that the case?

What do you see when you examine the data in the corresponding columns for the row you are viewing?

2 Likes

Looking at the cases, it appears that the else case is only possible when the Sparen list is exactly equal to 0.1 (that’s exactly what you want, right?).

Consequently the visibility of the component could be conditioned to “UserProfile> Status Sparziel” is empty AND “Sparen list” is not equal to 0,1.

However it is only a change of point of view, it does not deviate from @Darren_Murphy’s observations and questions.

1 Like

@roldy makes a very good point. The “Sparen List” values look like they are the result of a math calculation, so it’s quite likely that the underlying values are not exactly 0.1, etc.

Even through you might configure a math column to a single decimal place, this is only for display purposes. Glide will still store the precise value (including as many decimal places as are necessary), and use those in any subsequent calculations.

I wouldn’t mind betting this is your problem. If it is, a simple fix would be to enclose your math formula in a round() function, to force a single decimal place.

1 Like

@Roldy @Darren_Murphy Thanks for this quick evaluation. This helped a lot!

I changed tried to fix the problem now by checking the value in a different column.

image

And set the visibility options like this:
image

Unfortunately this still doesn´t work. ,-( Do you still see a problem with different values in the “Sparen Ist” column?

Again this should work. So the problem is elsewhere, let’s try to understand where.
What is the formula contained in Sparen lst?
If you don’t set any visibility conditions, does the component show? What if you set one condition at a time?
Is the component in a detail screen? In an edit form? In add form?
What kind of component is it?
Does the component trigger an action?

1 Like

I would ask this question again:

Sometimes in cases like this, it can turn out that you’re not viewing the row that you think you are viewing.
If you use the Data View whilst in Layout mode to inspect the column values, it should be possible to figure out what’s going on.

1 Like

Guys, thanks for the good advice on how to check the problem. With this I found a filter wrongly added to the screen (not the component). After deleting it, the visibility option worked.

I learnt a lot again … :pray: :joy: