Given a facility name, a list of fields, and a corresponding list of values, update facility information in the database.
Arguments
- facility_name
The name of the facility. Must be the primary name.
- field
A list of field names whose values you wish to change. Should align with
value
.- value
A list of values you wish to change. Should align with
field
.- test_db
Is this a connection to the test database? Defaults to
FALSE
.
Examples
update_facility(
facility_name = "Buckland Community Centre",
field = list("physical_address", "designation"),
value = list("Corner Logan and Buckville Road", "Community Centre"),
test_db = TRUE
)
#> # A tibble: 1 × 15
#> facility_type facility_id facility_attribute_id name physical_address
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Asset A26 FA174 Buckland Com… Cnr Logan and B…
#> # ℹ 10 more variables: local_board <chr>, latitude <lgl>, longitude <lgl>,
#> # designation <chr>, delivery_model <chr>, facility_ownership <chr>,
#> # closed <lgl>, staffed <lgl>, leased <lgl>, entry_access_type <chr>