How to filter out certain records based on a join / add-on

Answered

Hi there

I'm a noob so please forgive what is likely a basic question.

Refer to the attached images. I am trying to create an API that will return all Users that do not have a subsidy for an input business_id. As you can see, each subsidy record has both a user_id and a business_id.

My API is getting all Users fine, and I am able to create an add-on that returns all subsidies for each user. But I can't figure out how to then filter out users that already have a subsidy for the input business_id.

I basically need to filter our user records where subsidies.business_id = the input business_id.

Any help appreciated!

Thanks.

3 replies