Id like some buttons to be able to change state once pressed. Eg “Escalate” > “Escalated”. This would hugely enhance UX in our system. Is there a way to do this, or is it on the roadmap? Thanks all!
Sure, that’s just a basic feature from buttons. You can do it via the UI without writing any formula.
Take a look here: Button basics | Coda Help Center
Cheers Pablo. I want to change the text on the button itself for that row. Is that possible?
Ah sorry, I missunderstood you!
Yes, that’s also possible, but you have to use the hidden/experimental Button() formula. You can even change the color and icon once pressed, it’s very neat!
Button() formula syntax - Ask the Community - Coda Maker Community
Let me know if you still have questions after taking a look at this post
You don’t have to use the button() formula.
Actually, you shouldn’t even use the button() formula, unless there’s no other option.
It’s a hidden formula, it’s not recommended to use it without implementing a kill-switch for that formula. It can brick your whole document if you’re unlucky.
But what you’re looking for is still a standard feature of buttons.
You can change the name dynamically directly in the buttons settings.
Visual → Label → f
Here you can use a (safe) formula to display whatever you want.
@Felipe_Arnhold has a great example of how to implement that behavior inside a table without using a “potentially harmful” experimental formula
Hello Lucy
Just to clarify the context: You have a table where each row includes a button column. You want the text displayed on the button to depend on the specific row. Is that correct?
In this case, you can set a formula on the “Visible” property of the column. Here’s an example of how to do it: I added three helper columns—one for the text when the button is “Off,” one for the text when the button is “On,” and a checkbox to represent the state. The button toggles the checkbox, and the formula for the “Visible” property is as simple as if(status, BtNameOn, BtNameOff)
. If you have multiple statuses, you will need additional columns with the appropriate button names for each status.
Playable doc: Change Button text · Demos
Best regards
Arnhold
You are right of course, I’m so in love with the button formula that I forgot the normal button also allows a bit of customization Thanks for setting the record straight.
I love it as well!
But I wish coda could remove the weird grey “calculated value background” from the button formula. That would make the doc way more polished
Also the spacing is not aligned with the rest of the row anymore using the button formula
Thank you both! Totally sorted me out. II’ve changed 3 buttons on the platform and it is a much more intuitive experience for the user now.
(NB ended up using the formula, which is super straight forward" as had multiple actions that were running on button press. Also just put the value option in quotation marks in the formula so there are less column in the doc)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.