feat(#9875): document how to use select_*_from_file - #2229
Conversation
|
@mrjones-plip can I get a quick docs review! 🙏 I am confident in the technical accuracy, but would appreciate your thoughts on clarity and level of detail. |
|
I'm gonna run through setting it up to see how hard it is. tl;dr - I think this is close, but we could just a smidge more to get a POC. Gimme a sec and I'll send back a formal review! |
There was a problem hiding this comment.
yay! this reads well and has good examples
minor tweaks for clarity and and then a few more example values to guide folks
Separately (and kinda out of scope for this PR) I failed to get the feature to work though - lemme know if you're concerned!
- check out latest
feat(9875)/external-dataset-formsbranch fromvikrantwiz02's repo - build images and run them in docker (got no time for
npm run dev-api😅 ) - edit death form to have
select_one_from_file foo.xml - add
./resources/foo.xmlwith contents of XML from this commit - push it all with
chtandconvert-app-forms upload-app-forms upload-resources -- death_report - go to death report and see
Error loading form. Please try again or check with an administrator.in browser and console saysError loading form Error: Failed during the form "death_report" rendering : External dataset "foo" not found in resources. Only XML files are supported.
🤷
Did you remember to also update the
Are you sure you set Thank you for taking the time to try out the code! It is good to have another set of eyes on stuff here. 👍 |
|
Yes! I tried both this in
and also
Neither worked. I also made sure to
Yups - I literally copied it from my form. Speaking of which - here's the whole zip (TMI, but it's small): default.mrjones.select.from.file.zip. Also here's the full and docker images were named after the branch: Happy to pair quick next week if it'll help! |
|
I just did a git pull origin output on vikrantwiz02-core's branch
|
|
That just looks like the changes from |
|
Adding an update for posterity - after just waiting over the weekend, I came back this morning and my form just worked without me changing anything from when it was broken last week. @jkuester and I theorize the web app wasn't getting updated and my aggressive "shift + reload" wasn't actually reloading the app. This PR is doubly good to go now! |
Co-authored-by: mrjones <8253488+mrjones-plip@users.noreply.github.com>
Description
Just adding some brief documentation for how to use the newly supported
select_one_from_fileandselect_many_from_filequestion types in a form.I have tried to keep the documentation concise while linking to additional information. I assume the reader is already familiar with configuring forms and uploading resources and just needs the key info on how to connect the two.
cht-core issue: medic/cht-core#9875
cht-core PR: medic/cht-core#10971
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.