Conditional visibility of components usage question

Bravo on this feature release @Mark . Saw the announcement in app but haven’t seen in mentioned in the forums yet.

Quick question about implementation, is there a way this can be used which bases it on a condition of the signed in user?

Basically i’m trying to accomplish user roles where if the user has a role assigned of “x” they would be able to see the component.

1 Like

Not yet, but that’s definitely something that will be possible eventually.

1 Like

What is this used for then, can’t think :thinking:

There are lots of things that this could be used for, but thinking back to a previous thread, I had created a small example to show or hide an image button based on the value in a different column. That example was intended to hide a button once a user had a count of 50 it more in a column…so they couldn’t submit not than 50 times for example. Another example would be to only show a button to allow someone to proceed if they agreed to terms and conditions. It’s probably one of those features that won’t make much sense until you run into a situation where you actually need it.

It’s very useful in forms, for example, where you might have to enter more information if you select a particular option.

I used it in a party RSVP app. If you select “Are you coming?”, you get new questions “Are you bringing a +1?”, and “Any dietary restrictions?”.

2 Likes

@mark, can you elaborate a little bit more on your RSVP app? I’m trying to see if I can control which entry components show based off of other components in an Add/Edit/Form scenario. It seems to work fine when in View mode. I’m just trying to establish if it’s possible or not.

I’m just discovering that we have a bug - in a screen where you edit a row (add/edit/form screen) the visibility should be conditional on the edited row, but right now it isn’t.

My RSVP app just used a regular detail screen with edit components.

1 Like

Sorry but what am I missing? Was there announcement in conditional components?
Can someone share? Currently I create this myself with images …

@mark Seems to be working in Add/Edit mode

@yinon_raviv You can now add conditions to show or hide components based on other component or column values. Here are some screen shots that show how to do it.

Select a component to edit it’s details:

Select the Features tab:

Add the condition you want:

Capture3

Yes, we fixed it :wink:

1 Like

Documentation for visibility is here now: https://docs.glideapps.com/all/reference/layout/component-visibility

And I made my own version of Mark’s party invite app with conditional visibility. You can copy the app and check it out if you want. https://partyinvite.glideapp.io/

5 Likes