Fields related to link field do not appear

Hi all ,
I created doctype with name [Resignation] with two fields Employee [Link/Employee] and Employee Name [Read Only/employee.employee_name] .

But when i select employee the name does not appear

Please Help :frowning:

1 Like

This is weird. After saving did the name appear ?

Check your variable that you are referencing from Employee i.e. employee_name is it correct or not

Variable that is referencing to Employee is correct
and the name does not appear after saving

Any errors or so found in console or the bench start trace ?

Wait, see that data type of Employee Name field - why is it Read Only and not Data ?

Change it to Data and I think it should solve your problem.

No error in console

but in network the url as shown in pic
the variable fetch sent empty
when you try to pass employee_name it will work

No i did it Data and it did not work
and Read only is working in attendance doctype

Same problem. Did you find a solution yet?

You don’t have to put employee.employee_name in options.

Put in on “Obtener de” box…

in my example, library_member is the link field

For any one who might be wondering about it, the solution that worked in my case was:

Add Link Field Lets Say “Customer Name”, the name of the field when saved will be customer_name.

Now to bring customer’s mobile no, create a field named Mobile No, type will be Read Only and in Fetch From section, you will need to write customer_name.mobile_no

This will fetch data correctly.

You should mention employee.employee_name in Fetch From column not in Options