if (FALSE) {
# Using recastRecords after export
Recs <-
exportRecordsTyped(rcon) |>
recastRecords(rcon,
fields = "dropdown_test",
cast = list(dropdown = castCode))
# Using castForImport
castForImport(Records,
rcon)
# Using castForImport to recast zero-coded checkbox values
castForImport(Records,
rcon,
cast = list(checkbox = castCheckForImport(c("0", "Unchecked"))))
# Using guessCast
exportRecordsTyped(rcon,
cast = raw_cast) |>
guessCast(rcon,
validation=valRx("^[0-9]{1,4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$"),
cast=as.Date,
threshold=0.6)
# Using mChoiceCast
exportRecordsTyped(rcon) |>
mChoiceCast(rcon)
}
Run the code above in your browser using DataLab