Load all column items to a "select" options list

Hey,

I thought this would be as simple as:

import frappe
from frappe.model.document import Document

class Recipe_test(Document):
	def onload(self):
		selfe.var_material = frappe.db.sql_list("""select name from \`tabRaw materials` where item=%s""", raw_materials.cat_num)
	pass

I still think it should be simple, but I’m probably missing something.
Can anyone help?

Hello,

Why not use Link fieldtype for this one and filter them out?

Regards,

Ivan

:man_facepalming:
Thanks

1 Like