Please check the video: Fetch Child table form one doctype to other doctype - #6 by NCP
logic will be same.