For one of our analysis, i have used sidebarpanel and tabset to show different steps on the same page. Each of the step has its own action button "GO".
Now when i execute all of them one by one the first time, am not seeing any issue. but the second time i try executing any of the step independently, its not executing the right functions.
output$inc <- renderTable({
input$goButtonb
input$goButtona
input$goButtons
if (input$goButtona == 0 &&
input$goButtonb == 0 && input$goButtons == 0)
{
return()
}
else if (input$goButtona != 0)
{
isolate({
withProgress(message = "Pulling the exp", {
if (input$old_new_ind == TRUE)
{
incorrect_new_exp(
user_name = input$Usernamea, date1 = input$datea,threshold = input$threshold, date2 = input$datea -
1
)
}
else
{
incorrect_all_exps(
user_name = input$Usernamea, date1 = input$datea,threshold = input$threshold, date2 = input$datea -
1
)
}
})
})
}
else if (input$goButtonb != 0 && input$goButtona == 0 && input$goButtons == 0)
{
isolate({
withProgress(message = "Process started", {
pool_information(
tr_id = input$tr_da, trm_id = input$trmvrna, date3 = input$dateb
)
})
})
}
else if (input$goButtons != 0 && input$goButtonb == 0 && input$goButtona == 0 )
{
isolate({
withProgress(message = "Sample SOJ for the Pools", {
soj_pool(
user_name = input$Usernames,tr_id = input$t_tids,tvrsnid = input$tvrsns,date = input$datep, pool = input$pl
)
})
})
}
else
{
return()
}
})
navbarPage(
"", tabPanel(
"Tools",
sidebarPanel(
helpText("Step 1 (Get the exp)"),
dateInput("datea", label = "Date of Issue"),
textInput("threshold", label = "Threshold", value = 0.1),
textInput("Usernamea", label = "Username (please change)",value = "xxxxx"),
checkboxInput("old_new_ind", label = "New Exs Only",value = FALSE),
br(),
actionButton("goButtona","Go!",icon = icon("refresh"))
),
sidebarPanel(
helpText("Step 2 (Get the pl Information)"),
numericInput("tr_ida", label = "Tr ID",value = 1234),
numericInput("tr_vrna", label = "Tr Vn", value = 1),
dateInput("dateb", label = "Date"),
br(),
actionButton("goButtonb","Go!",icon = icon("refresh"))
),
sidebarPanel(
helpText("Step 3"),
numericInput("tr_ids", label = "Tr ID",value = 1234),
numericInput("trvrsn", label = "tr vr", value = 1.0),
dateInput("datep", label = "Date"),
textInput("pls", label = "Pl (Single value)"),
textInput("Usernames", label = "username",value = "xxxxx"),
br(),
actionButton("goButtons","Go!",icon = icon("refresh"))
)
, mainPanel(tableOutput("inc"))
)