Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new export parameters for submission export #137

Open
florianm opened this issue Jun 1, 2022 · 2 comments
Open

Support new export parameters for submission export #137

florianm opened this issue Jun 1, 2022 · 2 comments
Assignees
Labels
feature a feature request or enhancement

Comments

@florianm
Copy link
Collaborator

florianm commented Jun 1, 2022

Feature

Provide the new submission export parameters where applicable, especially "split multiple select answers into columns".

@florianm florianm added the feature a feature request or enhancement label Jun 1, 2022
@florianm florianm added this to the ODK Central 1.4 milestone Jun 1, 2022
@florianm florianm self-assigned this Jun 1, 2022
@Thaliehln
Copy link
Contributor

Thaliehln commented Jun 20, 2022

Hi @florianm,

Are you referring here mostly to odata_submission_get(...) or also to submission_export(...)?

If you are interested, I started modifying the function submission_export(...) for my own needs this weekend (mostly as I really need to limit the amount of data I retrieve from the servers to run quick tests, etc - as it starts to be huge), inspired by what you had already done with odata_submission_get(...) (very helpful - I actually reproduced the filter feature exactly as you had implemented it).

I have the following - you can advise if you have a specific convention for naming variables

qry <- list(
      attachments = ifelse(media == FALSE, "false", "true"),
      deletedFields = ifelse(delfields == FALSE, "false", "true"),
      groupPaths = ifelse(group == FALSE, "false", "true"),
      splitSelectMultiples = ifelse(split == FALSE, "false", "true")
)

The updated function seems to work fine on my data but obviously there would be more checks/tests needed for ruODK depending on the version of ODK Central that is used. About this, I am not sure if the odkc_version parameter is dynamically updated? On my side it seems to be systematically set to 1.1 (I am using 1.5 or 1.4)

@florianm
Copy link
Collaborator Author

Hi @Thaliehln! Thanks for the contribution!
I'm absolutely behind on updating ruODK to the latest Central features. Thanks for pushing this forward.

Re naming conventions: I've used snake_case elsewhere over camelCase.

Re ODK Central version: Unless you set ODKC_VERSION, https://github.com/ropensci/ruODK/blob/main/R/ru_setup.R#L519 defaults this to 1.1. Under the bonnet, that's fine, as I use it to toggle support for breaking changes - last seen at 1.1. At the next breaking change, I'll bump this to the then current Central version.

Re filter syntax, I'm linking getodk/central-backend#495 here as a reminder to myself to update ruODK functions/help/examples/vignettes where applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants