Importing data from one doctype to other

Hey there!, so i am developing an application and was stuck in between. The problem is the in one doctype i enter the info in field for suppose dish name and its ingredients through child table and then i created another doctype to store the nutrition of each ingredients in that dish, where the person select the dish name then all the ingredients comes and with and corresponding to each ingredient user can input the nutritional values like kcal, fats etc.

How to build this, is it is possible without script??

Hi @Ujjwal_Bisaria1,

No.

Please check the whole video.

1 Like

Yes and No.
For the list to populate itself, you can’t.
But if you list the ingredients of the dish you can with “fetch data”.
You need to have a doctype for ingredients. This should have a field with ingredient name and fields with nutritional values. e.g.

name
fats
energy
sodium
.
.
.

Your child table should have an ingredient name field of Link type, linking to ingredients doctype.
for each nutritional value you select a field type the same as the one in the ingredients doctype and under Fetch From you select the field name of the required information:
image
If you want to sum everything, you will need a script.

thank you, it really helped