Form field labels which include a double quote character " will cause an error when collecting into a dataframe:
records <- getRecords("c123") |> collect()
This seems to be caused by a JSON serialisation/deserialisation step that does not escape the quotes correctly when computing dataframe column headers.
This is not due to the server response, as the form schema query correctly escapes the field labels in the returned JSON:
{
"id": "cxyx2t6mdelrfwr6",
"code": "yn",
"label": "\"Yes / No\"",
"description": null,
"relevanceCondition": "",
"validationCondition": "",
"required": false,
"type": "enumerated",
"typeParameters": {
"cardinality": "single",
"presentation": "automatic",
"values": [
{
"id": "cgex1hkmdelrfwr5",
"label": "Sí"
},
{
"id": "cjj2lefmdelrlx57",
"label": "Non"
}
]
}
Workaround
Two workarounds currently identified:
- Update the columnStyle to use codes for header labels, and update form design to add field codes where labels include
":
records <- getRecords("c123", style=columnStyle(columnNames=c("code", "label"))) |> collect()
- Update the form design to remove
" from any field labels