I’m having a difficult time with a Select List column.
No I can’t share the document so please don’t ask.
If I use this formula:
List(thisRow.Month.MonthlyHabits).Sort().Unique()
In a SELECT column then the field shows up properly and allows me to CHOOSE an item from the list.
MonthlyHabits is a related field from the Monthly Plan table.
This allows me to choose only ONE item.
If I change nothing but change MULTIPLE SELECT to on then it messes up the items and just shows me a “list” with it looking like [habit one, habit two, habit three, etc.]
WHY? This is not right. If my select list is written properly then I should be able to choose multiple items or not choose multiple items.
Basically I have:
Habits table
Habit
Objectives table
Objective
Habit – select list from Habits table
Monthly Plan
Objective – choose the ones to work for this month
Habits – pulls habits associated with these objectives
Weekly Plan
Month – link to Monthly Plans
Weekly Habits – I want this to be a SELECT field that populates from the Monthly Plans Habits.
As I stated it works properly if I do not allow MULTI SELECT but that’s useless as I want to select as many as I want.
I’ve tried at least a dozen ways to do this with just selecting directly from HABITS and then trying to FILTER that select and it just gives me crap every time. This is a very simple thing yet I’ve spent two days trying to make it work. It shouldn’t be this difficult and I’ve scoured the Community posts and find bits and pieces of useful information to try but I’ve found nothing to fix this. Every version of FILTER I’ve tried on the Habits table just results in junk or an error. I’ve written hundreds of filters but FILTER inside a SELECT isn’t working as it should. What am I missing?
Well after spending almost two days on this I finally figured it out. I still don’t understand the WHY and Coda needs to do a little better at documenting some things like this.
What finally worked was adding a .Split(", ") to the Contains() in the filter. I’m guessing there’s some issue with TYPE. Why it will work perfeclty in one scenario but not in another I have no idea.
But it’s working now. Now I just need to remember this because I’ve seen it come up in something else.
Hi @Susan_M_Davis,
firstly, I’m happy you were able to sorted out the issue, although with some extra energy
The reason why an example is useful, is because very often contextual details represent the possible answer to an apparent (or real) quirk behaviour.
In your second post you refer to a Filter()
with a Contains()
which is not mentioned in the first one and is perhaps useful to have a wider picture.
Further - as you suggested - it might be an issue with data type, and checking lookup relationships could explain for instance if MonthlyHabits
is a list or a list of lists (in that case, ListCombine()
would work).
I perfectly understand that sharing a document with sensitive data isn’t always possible, but my suggestion is that taking some time to build up a mock-up has several advantages:
- it allows you to isolate and test the problem
- you can engage the whole community with a concrete example.
- many others will take advantage of your findings
- it (usually) takes less time overall
I hope this makes sense.
Cheers!
1 Like
The problem is, I don’t have the time to figure out how y’all are posting little bits of Coda inside these posts. I see others doing it but I see nothing that allows for that and I really don’t have time to go figure it out while I’m trying to resolve an issue.
Thanks. It is some sort of data type mismatch problem. Select is obviously not a LIST type. Turning the select items into a list causes quirky behavior.
There’s not enough help provided in the formula document. Also lots of errors in that document as well. The ACTIVATE states that you can use it for a PAGE object but there is no reference on HOW to do that and tech support says it does NOT work with pages. So…that’s wrong.
Susan M Davis
1 Like