# 🆕 New containing screen context for conditions

**URL:** <https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316>\
**Category:** General\
**Created:** [July 11, 2020, 5:07pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316 "2020-07-11T17:07:42Z")\
**Posts on this page:** 15\
**Page:** 3

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [August 12, 2020, 1:51pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/41 "2020-08-12T13:51:08Z")

</div>

Here’s what I think should work:

1. Use Joined List to combine all the hours that you want to check against in a single string.
2. Use “contains” to check whether a particular appointment hour is part of that string.

---

<div class="post-metadata">

**Author:** ![Gabriel\_Sobral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gabriel_sobral/32/6513_2.png) [@Gabriel\_Sobral](https://community.glideapps.com/u/Gabriel_Sobral)\
**Post date:** [August 12, 2020, 5:37pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/42 "2020-08-12T17:37:01Z")

</div>

> [@Mark](#):
>
> - Use Joined List to combine all the hours that you want to check against in a single string.
> - Use “contains” to check whether a particular appointment hour is part of that string.

Unfortunately, this didn’t work. It doesn’t check if the hour is part of the string (“in” operator), instead, it checks if the hour contains (or not) the whole string.

E.g.: Filter to show only hours that doesn’t contain “12:00, 13:00, 14:00”, this means all of them, in other words, no filter is applied.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [August 12, 2020, 7:18pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/43 "2020-08-12T19:18:35Z")

</div>

Why doesn’t

`All Hours` contains `This Hour`

work?

---

<div class="post-metadata">

**Author:** ![Gabriel\_Sobral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gabriel_sobral/32/6513_2.png) [@Gabriel\_Sobral](https://community.glideapps.com/u/Gabriel_Sobral)\
**Post date:** [August 12, 2020, 8:01pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/44 "2020-08-12T20:01:01Z")

</div>

> [@Mark](#):
>
> `All Hours` contains `This Hour`

The problem is that the “chosen hours” list is not on the same sheet as the choice options and I have different lists of “chosen hours” based on stores.

A store can have multiple appointments, and I’m making an appointment on a store. I have to filter the choice options based on the already taken hours.

I’m using the screen context to get the list of appointments that are already taken for that store, and the problem is that on the left field of the filter it only shows me the “choices sheet” fields, therefore, all hours fields.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b27a2b4c8bf3dca660bd7980b6af4f85496bb09d.png)

My structure for that basically is:  
A sheet with all the hours possible (Where I get the choice component data)  
and  
A sheet with all the appointments made for stores.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [August 12, 2020, 8:31pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/45 "2020-08-12T20:31:28Z")

</div>

Ah, got it! I’ll see what I can do.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [August 16, 2020, 11:21am UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/46 "2020-08-16T11:21:10Z")

</div>

I’m loving this feature. It’s real value so far for me has been its ability to narrow down to the T the value required from a long list of choices. My users no longer need to select their item from a drop down choice list. Somehow it knows what the choice was. I’ve applied this to two of my templates already. It’s brilliant for the end user to see what they had selected on another tab already filled out for them on the next tab. I’m going to be brutally honest, I still have not fully grasped the mechanics of it and feel like I’m just firing the right shots in the dark. How I’m getting it to work, I’m trying to understand. But now I can have a list of 30 items on a choice component and not require the user to select theirs from that long list. I’ve noticed it’s more effective with an if then combined with choice. When I have fully understood how this is all working, I’ll get back.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [August 16, 2020, 11:28am UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/47 "2020-08-16T11:28:01Z")

</div>

I’d really like to see this work for forms soon. My use case: a user can select multiple positions in the Organization but should not be able to select one that is already assigned to them. So there is an “add a position form” that would be great if the position choice field in the form could be filtered to not contain User --\> Position. This would mean the choice only includes options not already selected by the user.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [August 16, 2020, 11:39am UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/48 "2020-08-16T11:39:17Z")

</div>

Hang on! @ Let me quickly test something. I think this already possible. The form you are asking them to complete contains the list ? You just don’t want positions already applied for by a user to appear on that list ?

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [August 16, 2020, 11:54am UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/49 "2020-08-16T11:54:31Z")

</div>

Correct! I’ve tried using the new method but it doesn’t work in forms.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [August 16, 2020, 12:08pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/50 "2020-08-16T12:08:23Z")

</div>

Okay I’m testing it. I’ve been firing shots in the dark and hitting the target too 😂

Let me just check. Tx

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [August 16, 2020, 1:33pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/51 "2020-08-16T13:33:53Z")

</div>

@kyleheney Trur 🚀 doesn’t work and only works when I create a relation. If this will serve your purpose you can make a copy unless you already have this working for you.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/4/43cc10d9910bb5bf92cbbe4651c5a1e15399d3c9.jpeg) ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/a7652f8e7ff56285fc76a1f3d43db156cf8f69b7.jpeg) ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/cda2279593414f179758d913b3a56b97c426892b.jpeg)

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [August 16, 2020, 5:16pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/52 "2020-08-16T17:16:03Z")

</div>

Thanks for trying! I was hoping to use the new simpler method in forms, so hopefully it gets pushed through to forms soon!

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 8, 2020, 6:29pm UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/53 "2020-09-08T18:29:46Z")

</div>

This looks to be working more than it has been in the past. It’s still not 100% functional for dates/times though.

This seems to be part of the “is Included in” conditions that were recently added.

See screenshots of a FORM:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/c9aedc287421971cb50d0dba6d3f2b156fdee871.png)

Dept 2 choices after selecting Dept1 in the first choice component (Dept 1 is no longer a choice)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/fb1e071cf6c1156b589fe9aa4145057410859c2e.png)

Filter conditions for 2nd choice component (where the “Dept 1” is Screen --\> Dept 1):  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/8/807abbb146fca382f928ca4d788968f0a74e893e.png)

Still an issue — Dates and Times! When I try to perform similar filtering with times, I don’t get the Screen condition as an option:

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b5236939b2dafaf949b2e73960bb16ba48d53e9e.png)

If the fields are not Date fields, I do get the Screen condition as a filterable option. If I change the type of my column to a Text field, I am able to filter out the previously selected option (like the first few screenshots above) by using the “Is not included in” filter, but doing that removes the “on or after” and other date-related filtering conditions.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 9, 2020, 12:14am UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/54 "2020-09-09T00:14:21Z")

</div>

@Mark do you know if this is a bug, or by design? I’m just curious because having it work for Date/Time fields would be very helpful if it’s possible.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [September 9, 2020, 12:15am UTC](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/55 "2020-09-09T00:15:54Z")

</div>

Seems like a bug. I’ll look into it, thank you!

[Previous page](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316.md?page=2)
