I get the following error when clicking my button which should run my named query as per ignition documentation to pull from my blob server which stores my pdfs. trying to then write to the pdf viewer but error in line which starts with "bytes = "
I previously had it as per documentation without db.data but that didnt work either
gave this error: NameError: name 'data' is not defined
Any ideas?
File "event:actionPerformed", line 27, in
AttributeError: write-only attr: data
var = system.tag.readBlocking("[default]SQL Edit/filename")[0].value
parameters = {"filename":var}
db = system.db.runNamedQuery("RetrievePDF", parameters)
# Grab the file bytes and name from the same row.
bytes = db.data.getValueAt(0, "Content")
name = db.data.getValueAt(0, "filename")
# Load the bytes into the PDF Viewer component.
event.source.parent.getComponent('PDF Viewer').loadPDFBytes(bytes, name)