Run button: advanced app workflows
Run button for conditional apps
Ever wished your app could be smarter about when it runs calculations? Today, we're introducing a powerful upgrade to our Run button that puts you in control of your app's execution flow. Now you can trigger specific actions exactly when you want them, making your apps more dynamic and responsive than ever.
Here's how it works: each Run button can now control a Boolean variable that flips to True
when clicked. By using this variable in your Python code, you can create sophisticated conditional workflows that execute exactly when you want them to. You can get a quick overview in this short video or read more details in our docs.
As an example, you can now add multiple Run buttons to execute different parts of your notebook. In the demo below, the ‘Sales trends’ button produces a timeseries chart, while the ‘Reviews’ button displays correlation data.
When building apps with multiple input blocks that depend on each other, you can use the Run button to create more controlled workflows. The button allows you to delay the execution of downstream code until you have all the necessary input values collected from the user.
Check out our example app to see how Run buttons can power dynamic, multi-step dashboards. Let us know how this feature works for you - we can't wait to see what you'll create with this new capability!