Add new settings data
add_settings_new_data.Rd
Add new settings data
Usage
add_settings_new_data(
session,
output,
r = shiny::reactiveValues(),
d = shiny::reactiveValues(),
m = shiny::reactiveValues(),
i18n = character(),
id = character(),
data = tibble::tibble(),
table = character(),
required_textfields = character(),
req_unique_values = character(),
required_dropdowns = "all",
dropdowns = character(),
r_message_bar = FALSE
)
Arguments
- session
Shiny session variable
- output
Shiny output variable
- r
Shiny reactive value, used to communicate between modules (reactiveValue)
- i18n
Translator object from shiny.i18n library
- id
ID of current tab / page (character)
- data
A list with data to add (list)
- table
Name of the corresponding table in database (character)
- required_textfields
Which textfields are required (not empty) before inserting data in database ? (character)
- req_unique_values
Which fields require unique values before inserting data in database ? (character)
- required_dropdowns
Which dropdowns are required (not empty) before insert data in database ? Default to "all" (character)
- dropdowns
Tibble with the values of distinct dropdowns names (tibble)
- r_message_bar
If the MessageBar is displayed with a r variable or with show_message_bar function (TRUE for r variable)
Examples
if (FALSE) {
data <- list()
data$name <- "New dataset"
data$description <- "Description of the dataset"
data$data_source <- 5
add_settings_new_data(output = output, r = r, i18n = i18n, id = "settings_datasets", data = data, table = "datasets", dropdowns = "data_source")
}