Select field from diffrent DocType?

Hi All,
I am sure you have answered such as the above questions several time.
In fact I tried but no avail.
I have DocType (Frappe without ERPNext) to insert some information. let’s name it Doc1 including fields A, AA, B, C, and D.
A is name and AA is code.
B is a select box with values B1,B2,B3.
if B == ‘B1’ , field C will appear otherwise it will be hidden.
if B != ‘B1’ , then C will have all A stored values (saved documents) where B ==‘B1’. once I save it C will get AA value for selected A.
for hide and not hide of C field it is working but if it is hide and I save a document it shows error message which is C mandatory. In fact, I need to make it Mandatory if it is unhide.

Second thing, D is address and I need to link it with address doctype (table). if I select the address it will just show me the selected address but in the save I need C has address ID not address name.

I hope it is clear for you.

Regards,

Also, I don’t know where is new app python files stored.
nothing in this path: frappe-bench ->apps → myapp

Hi @hwasly

Use depends on to hide and unhide the field based on the value and use custom script for validation of mandatory field.

You can find the app under frappe-bench > app directory. If it’s not there then the steps you did was not the correct and app has not created.

Thanks for your reply.
Hide and unhide is working but link it with different field is not working.
Also, I am able to see my created app in the same path but I expect to
find out some generated files based on new doctype.

rohit_w
November 9

Hi @hwasly

hwasly:

I have DocType (Frappe without ERPNext) to insert some information.
let’s name it Doc1 including fields A, AA, B, C, and D.A is name and AA is
code.B is a select box with values B1,B2,B3.if B == ‘B1’ , field C will
appear otherwise it will be hidden.if B != ‘B1’ , then C will have all A
stored values (saved documents) where B ==‘B1’. once I save it C will get
AA value for selected A.for hide and not hide of C field it is working but
if it is hide and I save a document it shows error message which is C
mandatory. In fact, I need to make it Mandatory if it is unhide.

Use depends on to hide and unhide the field based on the value and use
custom script for validation of mandatory field.

hwasly:

Also, I don’t know where is new app python files stored.nothing in this
path: frappe-bench ->apps → myapp

You can find the app under frappe-bench > app directory. If it’s not
there then the steps you did was not the correct and app has not created.


Visit Topic or reply to this email to respond.


In Reply To
hwasly
November 8
Also, I don’t know where is new app python files stored. nothing in this
path: frappe-bench ->apps → myapp