Please help with code read tag

Hi all
Sorry for my stupid question but i am beginner.
Please i have script code for read tag and query task.
But when I want read tag for query task doesn’t work it :frowning:
So this code id OK and functional :

	dataA= {'barcode': 'A0001',
			'where': 'A0'
		}
	
	query = system.db.runNamedQuery("Technic","technics/searchID/searchID",dataA).getValueAt(0,0)
	self.getSibling("Label").props.text = query

But when I want read dataA from tag query it does not work :frowning:

	dataA= {'barcode': system.tag.readBlocking(["[default]adapter/StartBarCode"])[0],
			'where': system.tag.readBlocking(["[default]adapter/barCode"])[0]
		}
	
	
	query = system.db.runNamedQuery("Technic","technics/searchID/searchID",dataA).getValueAt(0,0)
	self.getSibling("Label").props.text = query

You need to extract the value property - system.tag.readBlocking returns a list of QualifiedValue objects, from which you can extract the value, quality, or timestamp of the value.

values = system.tag.readBlocking(["[default]adapter/StartBarCode", "[default]adapter/barCode"])
barcode = values[0].value
where = values[1].value

# Alternate syntax, a bit more efficient:
# barcode, where = [qv.value for qv in system.tag.readBlocking(["[default]adapter/StartBarCode", "[default]adapter/barCode"])]

dataA= {'barcode': barcode, 'where': where}

query = system.db.runNamedQuery("Technic","technics/searchID/searchID",dataA).getValueAt(0,0)
self.getSibling("Label").props.text = query

Thank you :smiley: