Using reactive values in markdown file

Hi,

I am new into using markdown files and creating a shiny document from code like markdown files.
I am currently trying to "pull" a table from a database, which is selected from an input panel with "selectInput" and "textInput".

´´´´
Chunk1:

inputPanel(
textInput("sqlServer", "SQL Server ", value="example"),
textInput("data_base", "Database ", value="example_db"),
selectInput("sqlTable", label = "SQL Table", choices = c(ex_tab_1, ex_tab2)
)

Chunk2:
df <- sqlQuery(odbcDriverConnect("driver={SQL Server};
server={input$sqlServer};
trusted_connection=true;
Database=input$data_base")),
"Select * from [input$data_base].[input$sqlTable]",
stringAsFactors = F")
´´´´

Can someone tell me, how to make this work?

br
Gauß

For this question and your other one please have a look at these two (related) articles:

Maybe these could help you.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.