1

I have a Slack dialog that has two SELECTs and both are pulling data from an external data source. However, the available options of the second SELECT are entirely depending on the selected value of the first SELECT. Is it possible that slack can somehow pass the selected value of the first SELECT to the payload of the second SELECT's request?

I can't seem to find a way to do it.

Thanks!

badallen
  • 1,127
  • 9
  • 16

1 Answers1

0

Assuming you are doing this within a modal view, there are two ways to approach the problem:

  • Approach 1: stick to 1 view and update it*:
  • The user picks from list 1.
  • This triggers a block action payload to your app which gives you access to their choice.
  • You can then update the view with new input blocks for list 2 that you've set up correctly.

The catch here is that list 1 can not be an input block, but rather an action. It will not be part of the final payload of the form.

  • Approach 2: split into 2 different views*:
  • The user picks from list 1.
  • The user submits view 1
  • You handle the view_submission event by pushing a new view with the appropriate list 2
m.oulmakki
  • 296
  • 1
  • 6