Check how Depends On works in ERPNext.
You can set value in the Depends On field from Customize Form.