Accessing custom fields/forms records directly at the DB level is not recommended, as the DB schemas can change without prior notice. This might cause any queries, or reports built around the same, to fail. |
Custom forms and field values are stored in dynamically created tables, so it can difficult to find and access them directly from the DB. However, you can follow the steps below to get the query access to the custom fields/forms records.
Build a query in OpenSpecimen, which contains all the required fields, including custom (form) fields. (Refer to the https://openspecimen.atlassian.net/wiki/x/B4AhAQ page for more info)
Go to ‘Actions’ → ‘Save’ → Enter ‘Title’ → Click ‘Save’
Go the ‘Queries’ page → Click on the saved query to run it. This will add the query to the query audit logs.
Retrieve the SQL used by OpenSpecimen to display the results by following this wiki page: https://openspecimen.atlassian.net/wiki/x/GwDiGw
Run the query directly on the DB.