In my HMI, I want the selected row number to be a global variable which changes when the user chooses an entry in a dropdown list.
Here is the code in app.variables:
def getRow_Number(): global Row_Number try: return Row_Number except NameError: Row_Number = 0 return Row_Number def setRow_Number(newValue): global Row_Number Row_Number = newValue
However, I’m not sure how to call getRow_Number() when fetching a SQL query:
SELECT Tank FROM Tank_Table WHERE Row_Number = app.variables.getRow_Number()
I get a gateway error saying that app.variables.getRow_Number() is an invalid object name. Am I doing something wrong syntactically?