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

Variables with leading underscores and/or containing forward slashes are invalid for SPSS #246

Open
4 tasks
joshuaberetta opened this issue May 13, 2021 · 2 comments
Assignees

Comments

@joshuaberetta
Copy link
Member Author

@jnm
Copy link
Member

jnm commented Dec 12, 2022

All future changes in the export file should correspond to the SPSS Label export

I don't think we would ever do this for the generic XLSX or CSV exports: storing some kind of parallel form schema or weird "yes, we've made at least one SPSS labels export" state seems like a mess. Maybe we could create a set of rules for massaging variable (question) names for SPSS, and then apply those equally in the SPSS labels exports as well as in a new "XLSX for SPSS" export type 🤔

The good news is that, thanks to your work, people can already exclude the leading underscore fields from their exports. The use of _ as a delimiter for select-multiple questions looks a mistake of mine that could be easy to fix (one-liner plus unit test changes): https://github.com/kobotoolbox/formpack/blame/43daf1d1bd9ffecaeb0e66f8ffb5a957a6e9b9e2/src/formpack/utils/spss.py#L9. The big question, though, is what the separator should be. Our choices are limited:

Variable names can be up to 64 bytes long, and the first character must be a letter or one of the characters @, #, or $. Subsequent characters can be any combination of letters, numbers, nonpunctuation characters, and a period (.).

kobotoolbox/kpi#1607 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants