Display depends on another doctype's field value

Is there an easy way to show/hide a doctype field based on value of another doctype? F.e. the already existing depends on property to be set like [doctype].[field_name] == ‘1’

1 Like

Depends on only works for current form meta.

Can you share use case?

use case is:

  1. I have a doctype of Qualifications with fields QName and [Needs Certification] (checkbox).
  2. In a second doctype (Qualifications of Employees) I have the fields Employee and Qualification both linked with their tables, and another one field called CertificationImage.
  3. Now I want in the second DocType when the user selects a Qualification, the CertificationImage been visible only when Qualification.[Needs Certification] is true.

I hope I am crear

@emakis
Depends on may not work like the the way you want. but you can write a custom code in js file. you can fetch the value of “needs certification” when qualification is selected/changed then if your fetch returns true then you can set property using cur_frm.set_df_property(“certificationImage” , “hidden”, 1);

Regards,
Deep Trivedi

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!