The following seems impossible:
A link field is a link to a doctype. If you wan to pull specific field data, first you create the link field to the doctype, then additional fields can be pulled from this doctype via a data field_type, with fetch from function.
i dont want to pull data but create drop down list of the attribute in the child form .
so when ever a user is inserting item detail they can select the type gold-silver - platinum.
Typically this would be done at the item level. When you have item variants, each item get’s a unique ID based on the variants. You would selected the specific Item ID based on your desired attributes. Like Item GL-pur1 = metal_type(gold),purity(pur1).
Have you created all of your 'Items with variants` and the specific items with those attributes? You would then select the item first and pull the associated attributes.
The attributes are pulled from the Item.
Either way, the error message says it all.
If you want to pull field level data from another doctype, you have to fetch those field values after linking the doctype.
You might be able to accomplish this with filters. After linking the doctype Item Variant
and possibly Item Variant Attribute
you would create a filter to limit the choices “where metal_type = doc.metal_type”.