Named query returns [{Column:value}] instead of just value

Hey, folks.

I have an onActionPerformed running for a dropdown in Perspective. The options for this dropdown are filled via a query that pulls all values from one column in a table. The correct values populate into this dropdown.
image

After selecting an item from the dropdown, a named query checks the table for that selected value and returns the value from the correlated row's "Max" column into a text input field on the form. However, it does not return just the value. It is more of some sort of bracketed array?

Script for OnActionPerformed

def runAction(self, event):
	TemplateName = self.props.value
	self.getSibling("Maximum").props.text = system.db.runNamedQuery('qrySavedShopTemplate',{'TemplateName':TemplateName})

The named query above:

The result in the text field:
image

I'm not sure what I have screwed up here. Perhaps a data type is messed up? Thank you!

If you're expecting just a value, set the query to "Scalar Query"

3 Likes

Ah, that worked all too well. Thank you. I'm still pretty new to this stuff, hahah.

1 Like