-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Dynamic options in OpenForm step fields #355
Comments
I am trying to understand what you are trying to accomplish, is the following correct?
If the above is accurate, that's not possible at this time (at least not in the "nice" way you've described it) - though we are actively planning on adding support for this feature in the coming months. The main reason is that Workflow configurations are static and resolved at deploy-time. That is, the specific setup for the OpenForm step is defined statically and in whole via the app manifest. If you run A workaround in the mean time is to build your own form using the available interactivity features in the deno SDK. You can build a full interactive modal yourself, using all Block Kit elements available within Modals (specifically the Input block). There is one Block Kit element in particular, the externally-sourced select menu, that you can build a form in a modal with that should meet the use case you describe. Custom steps can register a 'block kit suggestion handler' to run some code at runtime whenever the externally-sourced select menu is typed into. I have a sample app on GitHub that shows off building a full interactive modal flow using the deno-slack-sdk: https://github.com/filmaj/interactive-approval It's an example 'approval flow' app that posts a message with an approve and a deny button. If the end-user clicks deny, it will open a fully-featured modal and implements its own form. One of these form fields is an externally-sourced select menu; in this example app it reads from a bundled .csv file to provide dynamic options in this select menu. Hope that helps! |
Thanks for the detailed reply! What you described is exactly what I need to work with, specifically I didn't know that workflows does not have the ability to resolve dynamic values, so the interactive modal looks like a good workaround. If this feature gets implemented that's great, but in the meantime I will try the interactive modal. |
Question
For instance, typically you provide some enum values in the form options:
Instead of
["one", "two", "three"]
, I have afetchName
from datastore function to get an array of names because the names might change so I do not want hardcoded enums. However forWorkflow
I am not allowed to add a step beforeOpenForm
because of the following problem:This means that I can't invoke any function via
addStep
prior to the form, is there a workaround?The text was updated successfully, but these errors were encountered: