Hi all: I have a screen that has 14 tanks. Depending on the contents of a dropdown list, the screen shows the contents of one of several cellars; the different cellars have differing numbers of tanks, and the visible property of the tank containers is turned on or off appropriately. Each of the 14 tank containers has the same controls for temps, pressures, etc. So far so good.
Some cellars are hooked up to factorysql and we have lots of data. Others have less data. The two sets are kept on different servers, different dbs, etc.
When the user mouse clicks on a tank container, I would like to direct him to the appropriate History_Graph screen. For the factory sql tanks I am using your pre-build tank history graph. It requires one parameter, the tank number. I can capture that from the tank cellar screen. The non-Factorysql tanks have a different history graph screen, which requires a different parameter (let’s call it BATCHID – that is also in each tank container in a hidden field).
My mouseclicked event for the first tank container cntTank1 is as follows:
Tank = event.source.parent.getComponent(“cntTank1.lblTank.text”)
FERMID = event.source.parent.getComponent(“cntTank1.lblFermid.value”)
print ("The Tank and Fermid are: "), Tank , " ", FERMID
if Tank > 800:
app.nav.swapTo(“Graph_Historical”, {“strTank”: Tank})
else:
app.nav.swapTo(“wnChartSingle”, {“FERMID”: FERMID})
Tanks 800 and up are on factory sql, anything else is not. Some tanks are strings (as in U12, rather than 467 or something). I suspect that will mess up the if statement, but really first things first…
When I print this statement to the debug window, I find that both variables are empty. Any thoughts on what I’ve missed?
Also, is there an elegant way in python to check if a variable is in a list? Ex. in T-SQL
IF tank NOT IN (‘901’,‘902’,‘903’,‘904’) etc.
TIA D. Lewis