You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a use-case where opens for select_one/multiple need to come from a database when the form is rendered. We want to either put either (1) URL for the data or (2) an SQL statement to get the data
This doesn't seem to be something supported by XLSForms. We were considering just adding a query or data_url column to the choices worksheet in our implementation, but it feels terrible.
The text was updated successfully, but these errors were encountered:
A recent not-yet-documented addition is the type xml-external. See more XLSForm/pyxform#107.
This is already used by some XLSForm users to do exactly what you describe. The database lives on a webserver and the jr://file/etc.xml is resolved in the media manifest that ODK-compliant servers support. You can use that XML data for anything in the XLSForm.
Serving custom content could be done across tools based on the authenticated user. In Enketo there is also a way to pass a query parameter in the webform URL that can be copied into requests for /formList (and thereby show custom manifest URLs based on the parameter). This provides a finer-grained control to customize the content of the XML data file.
@dagoss we are using select_one_from_file in this situation. For example, the XLSForm question has select_one_from_file my_list.csv, and then when we deploy the form we set up the media for the form with https://myapp.example.com/api/my_list?format=csv. This allows to deploy the same form in different places and set the url for the REST API that serves the data at deployment so we can change it for staging, production, etc.
We have a use-case where opens for select_one/multiple need to come from a database when the form is rendered. We want to either put either (1) URL for the data or (2) an SQL statement to get the data
This doesn't seem to be something supported by XLSForms. We were considering just adding a
query
ordata_url
column to thechoices
worksheet in our implementation, but it feels terrible.The text was updated successfully, but these errors were encountered: