How do I fetch particular name of the doctype using filters

Parent Doctype

Child Doctype

New Parent Doctype Looks like

List of Parent Doctype

Items Doctype List

Information:

  • Parent Doctype’s naming is based on the Item name

My question is when I select particular item in the child table it should automatically fetch the name of the parent doctype with respect to the item selected and parent document status as Submitted and should store it in Child work Instruction field. Please help me out with this.

Thank you