-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add ability to filter OData subtables #391
Comments
Linking to a new forum topic about filtering subtables: https://forum.getodk.org/t/using-filter-with-repeat-tables-to-download-odata/36245 |
I just got an ask for filtering a repeat table by |
I did some research on how to implement this, and we have few options here: 1) Addressing subset of a collectionWe can provide ability to filter parent table and then navigate to the children like:
I wasn't able to test this approach on the reference service provided by odata.org 2) Add
|
I agree that that combination is super helpful and probably meets many users' needs. In the second forum topic above, that option was mentioned, but Odil said that they want to download each table separately for some reason. My hunch is that there's a valid use case in this area. @lognaturel, for the case that you mentioned, do you think In terms of the three options above, option 3 with |
I think being able to filter each table independently would be preferable. Sometimes each table goes through a different process or some tables are completely unnecessary for some part of analysis. In those cases, it can be really annoying to have to deal with all data, especially if there are large numbers of submissions. For a concrete example, sometimes the form design pulls values from the top level into repeats so that the top level is unnecessary. In that case it’s a lot more convenient to only pull the repeat and not have to deal with the top level at all.
I agree! |
Filing an issue in relation to this forum post by @mathieubossaert: https://forum.getodk.org/t/propagate-submission-date-to-child-tables/34349
Right now it's possible to filter the primary OData table using the
$filter
query parameter. However, it's not possible to filter subtables:central-backend/lib/util/db.js
Lines 235 to 245 in f16636d
What's the best way in OData to enable subtable filtering? In terms of OData syntax, is a subtable allowed to reference fields in the primary table?
The text was updated successfully, but these errors were encountered: