I try to create a doctype that fetch another doctype field. But the code seem’s does not work. I am not a programmer so no basic programming at the moment
Here is my scenario:
I made a new doctype called “The Gates” which consist of 64 doctype. The doctype structure is simple, just like this:
I then made another field on the Advanced Class Module doctype called “Gates 01” which is a “check” field that is supposed to fetch the data if checked from “Energy Dates” doctype, with naming series “Gates 01”:
@cyberdee you have use the fieldname of the doctype “energy_gate_main.fieldname of the Gates doctype” this should entered in fetch from. remove other codes.
Noted. Also, how if I would like to get or fetch based on a specific The Gates doctype file? There are 01 to 64 file on the Gates, I would like to fetch for example: Gates 01 → automatically the field on the Advanced Class Module is fetching only the Gates 01 ext_editor_1 field. I must use Display Depends On right?
No. you have linked the gates doctype in new doctype there you will select the name of gates, so while selecting that you text editor value will be fetched.
Eg : If you select
Gates1 then you get text editor of gates 1
That is another problem I need to solved… I need the check field will automatically fetch (only if it was being checked) the spesific Gates file. So if user check Gates 01, it will automatically fetch the text_editor_1 field from Gates 01 only.
There are 64 document on the doctype called “The Gates”
I would like to fetch the text_editor_1 field from a spesific “The Gates” document using a checkbox field on another doctype called Advanced Class Module. But the fetch must be filteres depends on the The Gates name/naming series. So if user clicked the checkbox Gates 01 at Advanced Class Module doctype, it will automatically fetch the text_editor_1 field from the Gates 01 document. Same goes if user clicked other number such as Gates 03, it will automatically fetch text_editor_1 field from Gates 03 document from “The Gates” doctype. Since it has 64 document at “The Gates”, it a bit confusing for me to fetch one by one using the checkbox as a filter…
you can take referance from this :- https://www.youtube.com/watch?v=f4gPxUay7v0 go on 2:24,and add in “depends on” :-Eval:doc.fieldname == 1 or Eval:doc.fieldname == 0 , of Doctype2’s field.