Switch with Select Control options

Hey all,

Confirming if others are seeing this issue.

Select Controls with SwitchIf
A convention we use with Coda is having a Select Control specify options, then triggering functionality based on what has been selected.

A benefit of this approach is that the Select Control options can be renamed, but the functionality is preserved across all formula/buttons that use it.

New issue: Switch
We used to be able to do this with the Switch formula as well. Existing formulas still work, but we can no longer add or update Switch formulas to use this convention as of May 21, 2024.

Here’s a Coda doc (edit access enabled, shared with support) where you can replicate the issue for yourself:

Coda Support Response
Coda’s support team has responded that we can use text values instead of an option chip. However, this removes the benefit of being able to rename Select Options without having to edit all formulas that reference it.

My questions are:

  • Has anyone else encountered this change in functionality?
  • Do you rely on Select options in your Switch formulas or prefer some other approach?

Current solution
Ultimately, we can refactor all our formulas to SwitchIf. However, the buggy behavior that results from the workaround we demo in the doc seems to indicate there is something else going on here.



Please look at the doc’s switch formula and let me know if that is what you’re looking for!

Edit: Watched the video ha, I personally believe this is how it’s always been, the way to get around it is by using [Control] = and the options will be brought up as a pill.

I do think they should be selectable by default, but you can easily go around the issue by saying [Control] = and then only keeping the pill.

HI @Micah_Lucero , thanks for explaining the trick and since it is an extra step, I believe it is a bug. It should be simple and we should get a list of items we can select from.

cheers, christiaan

I’m afraid I don’t see a bug here, are you certain you understand how SwitchIf works?


SwitchIf([select 1], Birds,  "Bird", ... )

This is simply an incorrect usage, it will always return Birds regardless of what’s selected (unless blank), because the first parameter evaluates to true, which is exactly what we see at 1:08 in the loom

I really don’t see a but either - it has nothing to do with the copying of the switch, the CFL for Switch is different from Switchif.