Skip to content

metadata names expected by cb_create_redcap() don't always match names from REDCap dictionary #39

@ccsarapas

Description

@ccsarapas

cb_create_redcap_options() includes:

  name = field_name,
  var_label = field_label,
  val_labels = select_choices_or_calculations,
  type = field_type,
  form = form_name

Plus, integer coercion depends on text_validation_type_or_show_slider_number, which is hard-coded. But it seems like these names aren't consistent. eg for a recent project, had to use

cb_create_redcap_options(
    name = `Variable / Field Name`,
    var_label = `Field Label`,
    val_labels = `Choices, Calculations, OR Slider Labels`,
    type = `Field Type`,
    form = `Form Name`
  )

and had to manually rename field Text Validation Type OR Show Slider Number to text_validation_type_or_show_slider_number. (This threw an error even when coerce_integers = FALSE, which may also bear looking into.)

Need to learn more about what names can actually be included in dictionary / how much variability there is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions