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

Advanced XForm Recipes #309

Open
lognaturel opened this issue Oct 18, 2017 · 5 comments
Open

Advanced XForm Recipes #309

lognaturel opened this issue Oct 18, 2017 · 5 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Oct 18, 2017

#20 and #222 pull in some form design documentation that talks about raw XML. In general, this is not used much. However, there are some real cases in which it might be helpful.

Let's use this issue thread to collect those and to eventually add them to an existing document or create a new one.

Perform a complex calculation and show it to the user without introducing a new calculate field: https://forum.opendatakit.org/t/is-output-value-an-instance-node-or-xpath/10262/6

Iterate over a list of choices identified by a first question in a cascading select: https://forum.opendatakit.org/t/repeat-questions-depending-upon-selection/10033/8

Build a dynamic list of select choices based on previous form values: https://forum.opendatakit.org/t/generate-multiple-choice-alternatives-based-on-the-answer-of-a-previous-question/10269/4?u=ln

@adammichaelwood
Copy link
Contributor

Perform a complex calculation and show it to the user without introducing a new calculate field: https://forum.opendatakit.org/t/is-output-value-an-instance-node-or-xpath/10262/6

Is that really something that requires XML-editing, since there is a "canonical" way of doing it in XLSForm (that is... using a calculate field)

@adammichaelwood
Copy link
Contributor

Iterate over a list of choices identified by a first question in a cascading select: https://forum.opendatakit.org/t/repeat-questions-depending-upon-selection/10033/8

This also doesn't require editing the XML directly, does it? Just some complex knowledge of XML, but used inside XLSForm.

@adammichaelwood adammichaelwood changed the title Situations in which using raw XML may be useful Advanced XForm Recipes Nov 2, 2017
@adammichaelwood
Copy link
Contributor

I've reframed this issue --

I'm working on a doc for Advanced XForm Recipes that will include so things that can be done in XLSForm and some things that requires XML editing, and this can be added to over time.

@lognaturel
Copy link
Member Author

lognaturel commented Nov 8, 2017

Outputting a value without introducing a new field can be important because it's harder to work with data columns that aren't useful. It makes data exports unnecessarily complicated.

Regarding iterating over choices identified by a cascading select question, you're right. I suppose that category is things that the XLSForm ${} syntax doesn't surface and that require XPath knowledge.

Advanced recipes sounds good.

@getodk-bot
Copy link
Member

getodk-bot commented Nov 15, 2017

Hello @adammichaelwood, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 10 days.

You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

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

3 participants