Filter my retrieving data

good day

im a new in erpnext and i had custom doctype and make another i want to filter the data i get from the 1st one

That is insufficient data.
Please explain in detail what you want to do.

i have a field linked with another doctype this field is status there is an open, close status i need to show only the open status

Try below code -

frappe.ui.form.on("DocType","onload" ,function(frm){
cur_frm.fields_dict.field_name.get_query = function(doc) {
	return {
		filters: {
			"status":"Open" 
		}
	     }
       }
  })