Frappe Cloud Support Partners Foundation Frappe School

Frappe.db.get_list synchronously


I’m trying to run frappe.db.get_list synchronously, so that I’ll have something like:

var items;
frappe.db.get_list('Test Doctype',{
		'_user_tags':['like', '%' + tag_name + '%']
	'async': false // Is there anything similar that **would** work?
	).then(r => {
		items = r
	alert(items); // This gives back: "Uncaught (in promise) TypeError: items is undefined"

and actually see the list of items.

Pleeeeeeeas help!!


what are you trying to achieve exactly ?