Try ERPNext Buy Support Partners Foundation Foundation Members

Need help with depends on field

Hi all,
I have created a new field that depends on link field called Employment_type.
Let’s say Employment is of type Link with Trial Period, Apprentice, Permanent, and Temporary.
I have created a new field after it called No. of Trial days using data of type.
Question: what should i write in the “depends on” box to have Field2 to only display if Field1 is Option A?

I have tried many options.
without success

Any suggestion?

Thanks

1 Like

I am trying this on Depends on option in the field 2 but it’s not working.
eval:doc.employment_type==‘Trial Period’

Hi, it should work. Can you please provide screenshot of the customise table? Also, make sure the name of the Employment type field is indeed “employment_type”. Hope this helps.

Hi Michelle,

Thanks for the reply. Here is the web form i am building and here are the screenshot. These are the exact details I used on Employee doctype.


I am using the default Employment Type link field inside Employee table.

Please guide.

Thank you

Hi, in the 2nd screenshot you have written eval:doc.employee_type_name==‘Trial Period’. Change it to eval:doc.employment_type==‘Trial Period’. Because the name of the Employment Type field is employment_type. It should work then.

Hope this helps.

I already tried the employment_type but it’s not working. Is it because it’s list?

Thanks

In the 2nd screenshot, delete options “Enter Trial Period Days” and try once. This should work.

If the issue still persists, kindly send the issue along with screenshots to support@erpnext.com so that we can check it in your instance.

It’s working now. Thanks a lot. I have one more issue. The attach field in the Employee doctype is not allowing me to upload 2 or three files. It just upload a single document.

How can I fix it?

Thanks

Hi, you can attach multiple documents. It shouldn’t be an issue.

I got it but can you check this image, I don’t have an option to attach more images once an image is uploaded. The Attach button is gone.

Is this a custom field? Also, let me know the version you are using.

It’s a builtin employee doctype. I haven’t customized it. I am using v12.

Hi, I’m not sure if that’s a standard field though. However, as a workaround, try attaching documents using the Attach button as shown.

Hope this helps.

That’s working but individual attach field below Education History is not working.

Just a user-case question. I don’t want all employees to give desk access. Is it possible, if they can update their profiles, ask for leaves, claim expenses, submit reports using the website.

I am trying web forms. I am not sure, if it’s the right way. Further, Is it possible that employees can’t edit some fields after first data entry.

Thanks

For the first issue, yes, it is possible through web forms. However, regarding the second issue, applying user permissions after first data entry is not possible. As a work around, you can check workflows (if that’s what you’re looking for).

Thanks @Michelle_Alva for the update.

I have a new issue. An employee login to the website and click on web form i created for entering his details (All fields of Employment doctype), now issue is these fields are not prefilled because there are no instructions that fetches fields based on the user login.

Can you also suggest me a workaround of this?

Thanks for your great support.

Hi @rogger, from what I’ve understood reading your query is you want the web form to be pre-filled depending on the user who has logged into your system, right? But why would you want the form to be pre-filled in the first place? The form is meant for the user to fill his information… Please correct me if I’m wrong.