No problem @Joanna_Lamb
! We’re also all here to help each others
.
That would create a “circular reference”… which is probably one of the error you got
.
To work around this, you just need a way to “externalise” that “Complete” status you already have so it can be used in a formula without creating a “circular reference”
.
I think, given your screenshot, the easiest way would be to convert that field into a Select List (Coda will automatically retrieve the various values already in there, keep them as Selectable items and leave them as they are), then add another field to actually display either Scheduled (if the Date is not blank) or Complete (if Case Status is Complete) and use that new field to group your table
.
This would require you to manually mark each case as Complete in the future.
You could, of course, leave your original Case Status as a Text field
(but you would need to type Complete where and when needed
). You could also use a checkbox to mark your cases as Complete …
To illustrate, here is a quick sample
.
The first tables use a nested If() (Cases Status - 1 & Cases Status - 2)
If(
thisRow.[Case Status (Original)].Contains("Complete"),
"Complete",
If(
thisRow.[Test Date].IsNotBlank(),
"Scheduled",
""
)
)
Which kind of says :
- If the value in the field
[Case Status (Original)] is equal/contains "Complete" then “write” Complete
Otherwise
- if the value in this row
[Test Date] is not blank, then “write” Scheduled
Otherwise (i.e.: in any other cases)
You can get to that same result by using a SwitchIf() which works similarly to If() except you don’t need to precise an If false/Otherwise in the formula, only the value the formula should return if the condition is true
.
I used it in the last tables
(Cases Status - 3 & Cases Status - 4)
SwitchIf(
thisRow.[Case Status (Original)].Contains("Complete"),
"Complete",
thisRow.[Test Date].IsNotBlank(),
"Scheduled"
)
But everything here depends on the future of your actual doc (How big it might get, it’s purpose, etc…). These are just potential leads 