Show some other docfield of child linked with another doctype

Hello, I have a custom doctype Scheme of Study which have a linked child doctype Program Course. Program Course has a field course_code. What I want to do is to search the Program Course from the parent doctype with it’s course_code not with it’s name.
I also need to filter the Program Course entries with a condition.