ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Automatically select field based on another field


I have two fields and a custom DocType:
This custom Doctype is linked with the item_code in Item. And here everything working fine.
As a second steps, the second field, should be automatically populated with the value of item_name (from Item DocType too) and should be the Item name relative to the item code I previously chose.

Is it possible doing that without making any custom script?



I have tried with the example you shown me, but doesn’t fill automatically after i chose the item_code.


On which version you’re ?
Do you have fetch from field in your doctype child table? if yes then put it there instead of option field.


I am on 11.1.23,
I am in my custom form, that is without any child form.
I am fetching item_code directly from Item DocType.


When you open custom form item_name field, you’ll find fetch from option below option field, put this code there, item_code.item_name…


Thanks a Lot, now is working :smiley: