Show items NOT selected

Hi,

Newbie here just working my way through Coda.

I have a table ‘Schedule’ which has a lookup in a column to a table called ‘Employees’.

What I’d like to do is show above the table which employees have not been scheduled/selected (on the day filtered).

I’m sure this is simple, and I did a search but couldn’t find an answer.

I’d also like a warning if one employee is selected twice on one day, but can create a different topic if necessary.

hi @JasonB, you might have a look here : 🚫 Is there a formula for "Not Contains"?

Other options:
ContainsOnly()
!=

best, Christiaan

Thanks for the response.

The formula Not(Schedule.Crew.Contains()) returns the value ‘true’ rather than a list of employees not selected.

I am working on some coda stuff, short in time, but you might want to check this one out as well : Is it Possible for a select list to be selected only once?

it took me some time to get the feeling :wink:

1 Like

sharing a representative version of your tables would help

@JasonB

Here are some ideas you can play with:

3 Likes

I know the suggestion from @Ander answers all your requests elegantly :grin: :+1: , @JasonB but I got curious about that specific one :point_down: :blush:

Your post made think of an old one from last year so I got something a little bit different to suggest :

Instead of searching a way to find possible duplicates of your selected employees for a specific day, you could pre-filter those employees so they can only be selected once per day :blush:.
(This is just an idea :wink: )

2 Likes

Hi @Ander, thank you so much for this, I think I need to get better at formulas because I can’t make it work on my data (and even posting my actual data will not help, because it will be rote learning). Does it take long to get up to speed?

Hi @Pch, thanks for that. I did consider that but sometimes employees do two different jobs on one day, hence the warning and the user being able to decide if it’s okay.

@JasonB

The formulas take some practice, but you can get up to speed quickly by studying documentation for the ones that seem relevant to your use cases, here: https://coda.io/formulas

The most important part is proper data structure (schema). Everything flows from that. Good data structure does much of the work for you (as relational data is designed to do). Improper data structure makes formulas much more difficult.

If you think it would benefit your project, I can check your schema for potential problem areas. (You can send a link to your doc through the private messaging system of this forum.)

1 Like

@JasonB, in that case, effectively, @Ander’s suggestion seems to be the perfect lead to follow :wink: !

You don’t necessarily need to share the whole doc, but could you share a screenshot of the problematic formula that doesn’t seem to work when trying to apply the Ander’s suggestion to your doc ? :blush:

Sometimes, when asking for help and trying the solution to your own doc some things get “lost” in the process…