I have a request form that I need to do a lookup of contacts with a specific filter applied. It needs to return only the supervisors within the current cost code. I can do this with a sql statement like so:
select distinct ca_contact.contact_uuid , last_name, first_name, aud_ca_resource_cost_center.name from
(select distinct ca_contact.supervisor_contact_uuid from ca_contact) as t1
inner join ca_contact on ca_contact.contact_uuid = t1.supervisor_contact_uuid
inner join aud_ca_resource_cost_center on ca_contact.cost_center = aud_ca_resource_cost_center.id
where aud_ca_resource_cost_center.name = '2950'
I know that the dropdown gives me the ability to do a filter here:
I just can't seem to connect the dots to make the lookup actually work on the front end.
Any help would be appreciated!