Action button and selectInput in R Shiny: Passing input of selectInput (multiple = TRUE) to a function only after final selection is made

Hi,

Welcome to the RStudio community!

Issues with Shiny code can stem from both the reactive Shiny code itself or the regular R code used in the functions. In order for us to help you with your question, please provide us a minimal reproducible example (Reprex) where you provide a minimal (dummy) dataset and code that can recreate the issue. One we have that, we can go from there. You already provided some of the code, but parts of it are still missing in order for us to run and test it.

For help on creating a Reprex, see this guide:

Good luck!
PJ