You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of ["one", "two", "three"], I have a fetchName from datastore function to get an array of names because the names might change so I do not want hardcoded enums. However for Workflow I am not allowed to add a step before OpenForm because of the following problem:
Interactivity at step 2 needs to be mapped to an interactivity in step 1's output (invalid_interactivity_pointer)
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:
I am trying to understand what you are trying to accomplish, is the following correct?
Run some custom step to retrieve data from a datastore
Use the output of the custom step as a means of constraining the possible values for a particular OpenForm step's field's dropdown options
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 slack manifest and inspect the contents of the workflows property in the outputted JSON, you will see the entire workflow configuration defined there.
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.
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.
filmaj
changed the title
[QUERY] Can I add data from datastores to form dropdown options?
[FEATURE] Dynamic options in OpenForm step fields
Aug 27, 2024
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: