Do a search for: API Call field

I have a Data Type Prerequisites where one of the fields is from the API Connector i.e Course. I also have a page (index) with custom state of Course from the same API Call.

I want to Do search for Prerequisite where “Course” = index’s Course: first item
However, when I check the debugger :first item is (empty)

How can I resolve or work around this issue?

Before I had a field in Prerequisite called id - which got the id from the “Course’s” id from the API call.

When I Do a Search for “Prerequisite” where - “id” = index Course’s id :firstitem I was getting a result.

I wonder why it works for the “id” field but not for the “Course” field.