Searching for all movements by a user

Hi! Im working on an app that records when users rent out a product and return it. They are only allowed to rent out one element at a time. I have a data type that records location where it was rented out and location where it was returned. I want to set a condition so that if a user hasn’t returned the product they cant rent out again but I don’t know how to do this. I tried doing a search for all the movements and added a condition for the delivered location being empty but it doesn’t seem to be working.

Basically I want to search all rent movements created by user and only allow to rent if there are no empty values for the delivered location.

Create a field in rent DB, yes/no type or number or the type you prefer.

When user makes a rent in the workflows create also that field if yes/no put yes, or if number then put 1.

When user ends the rent make changes to that thing and set no on that field, or 0 if number.

And when user tries to create new rent make a only if search for rents filter by user, contains “the field” no or 0.

So when user that have a pending rent with yes or 1 will not be possible to rent again.