I am developing a project that consists of registering projects, deliveries and their respective activities, but I am having difficulty proceeding.
What I'm trying to do is the following: when the person selects the 'Project' in the dropdown list, in the 'Deliveries' field, only the 'Deliveries' registered for the selected project should appear.
My field has this code, but it doesn't work:
SELECT DISTINCT value
FROM redcap_data
WHERE project_id = 949
AND field_name = 'deliveries'
AND record IN (
SELECT record
FROM redcap_data
WHERE project_id = 949
AND field_name = 'projects'
AND value = [nm_project]
)