Filter by API ID

I have a backend workflow that deletes a specific thing of a data type I named Scheduled. Each Scheduled thing includes an API ID and time fields. I’m setting the workflow to run 1 minute after the scheduled time (i.e., one minute after the Scheduled thing is posted, that specific Scheduled thing is deleted).

I’m having a hard time filtering out the specific Scheduled thing I want to delete. My current setup just deletes the first Scheduled thing in the database, but I want to delete the Scheduled thing that is associated with a specific API ID, time, etc.

What am I doing wrong here?

Looks a little confusing and hard to follow, because right now you’re searching the database for a Scheduled, but with the constraint the field APIs contains all APIs in another search of the same datatype. Which sounds like it would never return a result.

If you want to find a specific one, I feel like it should be the constraint should be API ID = [specific known value] (or APIs, whatever the field name is :sweat_smile: )

Another thing to consider is if these Scheduleds aren’t doing anything, you could let them pile up in the database forever that won’t hurt anything.

1 Like