TableRelation in C/AL Code ?

Ok good.

Then go back to my reply where I suggested you to insert this filter on your custom field:

“Resource WHERE (Available=CONST(TRUE))”

That should solve your problem. If you want to set the table relation manually, then you specify this filter in the Table Filter:

2843.filter.png

The only potential problem I can see is if the field Available is not a normal field but a calculated flow field. Then it’s a bit more advanced to do this.