Display depends on another doctype's field value

ty @Deep for your response. Actually I realised that I had to use client side code to get the data I need. But now I am facing another problem: Help on error fetching data from another doctype
Any suggestion would be valuable!