🆕 New containing screen context for conditions

Conditions now have a new ‘screen’ context which lets you choose values from the current screen. This allows you to do things like:

  • Show items where Category is the same as Category (to show a list of items that relate to this one)
  • Show items where Price is equal to Price (to show a list of items which have the same price as the current item)

If you’re unsure of how to use this new context - this tutorial might be worth a watch → https://youtu.be/reeS28W0YXQ

20 Likes

Awesome! I gave a little demo here:


I’ve already used this feature twice in an app I’m developing. Nicely done Team Glide!

5 Likes

Thanks :pray:

Nice!

You’ll be announcing features before we release them soon :wink:

7 Likes

https://www.youtube.com/watch?v=gP2MWN0udU0&t=320s

If you need to have an AND and an OR condition, use an if-then-else column first.

For example, let’s say you want to a list of events that can only be edited by the event owner OR any app Admin AND only if the event hasn’t happened.

Here’s how:

  1. Create an if-then-else column in the data table from where the component resides (let’s name this column “Editors”)
  2. Create your OR condition within this if-then-else column. For example, if you want where Admin is True OR where email is signed in user, then create two if-then-else conditions:
    1. if Admin column is True then “true”
    2. if Email is signed-in user then “true”
    3. else “false”
  3. In your component conditions, create your AND conditions. In the Details > Edit > Conditions, you can now create the AND/OR logic by stating Allow Editing where “Editors” is “true” AND where eventDate is after Today.
7 Likes

Yes!! Thanks for that :heart_eyes:

This is great @JackVaughan!

Will we be able to compare a value to a list of values with this new feature?

I want to filter the choices that are available based on whether or not they have already been created for an item. I have a relation column to identify all of the sizes already created.

When I set this up, it seems like Glide is treating the relation as a value to compare to, versus a list of individual values to compare against.

2 Likes

You want to check whether the value is/is not one of the values in the list?

Yes, that’s exactly right.

1 Like

Has anybody tried yet? Would this allow someone to filter a choice component in an add/edit/form screen based on a prior selection? Would this help eliminate the 2 step form process where some selections would need to be made outside of a form, so that the value is written to the sheet, to set relations for list or choice filtering?

I’ve done this NOT in a form…it would be worth a try. Perhaps @Mark Would know off the top of his head?

Should work in a form.

Testing Now.

1 Like

is this on glideexpirements

Didn’t work on Add Screen. Got an empty second choice component.

1 Like

Yep. (Currently) Last tab in the navigation

1 Like

Doesn’t work in a form either:
Screen Shot 2020-07-12 at 1.48.28 PM

1 Like

@Robert_Petitto Could you please share this app so I can take a look at it?

It’s my experiments app:

experiments.glideapp.io or https://go.glideapps.com/app/WySsAPQ8TbrW4TAJDWyL

Last tab—Filtered List

1 Like

I’ve been waiting for this!
Thank you so much for the update!

Dependent drop-down lists are on it’s way: https://7eykr.glideapp.io/

Update: no matter what I select in list1, list2 is the same.

I’m using “Screen” option.