Issues w/ Switchif in Lookup Item Settings

Hi all, I’m trying to use coda to make a scheduling table, where individual staff have different assignments during the same period. I want to include a catch to make sure I don’t assign the same staff twice during the same period. I’ve been trying to change the item settings on my lookup column (which looks up staff on a separate table) so that if they’ve already been assigned during that period, their name doesn’t show up.

However, it only seems to be working for the first argument. For the second argument, all staff still show up even though they have an assignment during that period. Any ideas? Picture for Reference.

full schedule modeh ani selection

hi welcome @Brittany_Dufresne ,

I guess this post might be off help to you : Is it Possible for a select list to be selected only once? - #2 by Johg_Ananda

You need to open the settings of your lookup and play with Not() and In()

Hope it helps, cheers, Christiaan

1 Like

Thanks Christiaan - I’ve been playing around with it, but it’s a bit more complicated than the example above. We’ll see how I do though!

hi @Brittany_Dufresne , in case you might be able to share a copy of your work with the community, I guess some of us might be able to sort it out with you.

best, christiaan

That would be amazing. Here’s a doc link. Staff Schedules Trial

Any insights or suggestions are welcome!

hi @Federico_Stefanato , do you have a few minutes to have a look? I guess that what I proposed above is not in line with how the tabels are structured;

I am a bit blocked for the moment due to prolonged school holidays (3 weeks instead of 2), cheers, Christiaan

Hi Brittany,

What you describe is definitely possible, but I don’t think your current schema (the structure of your tables) is the way to do it.

I’ll take a crack at coming up with a solution for you, but I want to make sure I understand what you’re looking for.

It seems in the doc you sent it already limits the people you can select to those that aren’t yet allocated.

Or do you mean that if they are doing Breakfast on Monday they can’t also do Breakfast on Tuesday?

If that’s what you meant, you can create a column called [All Days] that has the schedule from all of the days put into one, then your lookup filter can be:

[All Days].Contains(thisRow).Not()

I implemented it in the [Tuesday] column for you: