I would like to pass a dataset into a script module, but I get an error when I call it this way. My dataset is one row of data with 8 to 15 columns of data. Depending on some values, I am returning a string value. That string value is the text value for my label.
Is there a way to do this? I could also get around this by looping through the row in my dataset and calling this script when appropreate, but I don’t know that I can loop through the columns of a dataset in the expression language.
The problem is that you cannot pass a dataset that way into a Jython script, you are going to need to use the Jython functions. You should use something like this to get the dataset:runScript("app.faultState.Depal(fpmi.gui.getWindow('Window 1').getRootContainer().dsDepal1)")
And for a short example, your function could be:[code]def Depal(dataset):
import fpmi
Also, the best way to get non-dataset values into the runScript command is:runScript("app.faultState.Depal("+{Root Container.myInt}+")")
This will look like “app.faultState.Depal(2)” after it is put together.