Need to fetch two doctype

dear team,
I had two doc type names Accomodation and Assign Accomodation.
with the help of community,i solve subtract issue using client script,
As Available Capacity = Capacity - Assigned Capacity.
i add data in assign accomodation and get available capacity,right now i need available quanity in accomodation unit even fetch with assign accomodation but,it not works.

thanks in advance

Hi @Mohamed2335,

Please check the fetch from example:

Thank You!

@NCP how to fetch this type of fetch option… thank you

Hi @nikita_sharma,

Please check it.

Thank You!

thank you @NCP