BM.4519.D system.db.toDataSet wont write data in a dropdown

Using the following code

pyData = system.dataset.toPyDataSet(system.db.getConnections()) newData = [] headers = ["DataSource"] for row in pyData: newData.append([row[0]]) event.source.parent.getbalhblahblahnewDataSet.data = system.db.toDataSet(headers,newData)

Give me a stack overflow. It can write to a real dataset no problem though, just the dataset “data” in a dropdown menu.

Huh, this works for me. Where did you put this script?

On the CTG pages Im modifying. The datasources dropdown of the pen edit screen, replacing the old scraping logic. Ill upload the vwin in a bit

The error occurs on the included files. Might be something easy, I am tired. Other then that error, here are the updated CTG files for Ignition
ignition ctg.zip (141 KB)

Hey Carl,
Have you tried the CTG stuff I have attached. Im installing the new build now, Ill let you knwo if it works there.

This problem was due to the script to set the dropdown’s data being on the dropdown’s propertyChange script - so every time the script was run and set the dropdown’s data, it fired a propertyChange, and so on until the stack overflowed.

A better approach would be to bind the dropdown’s data property to a runScript expresison that pulled in the list of datasources.

I used event.propertyName to check only changes from ListInit. Do you want me to upload the completed files now that they work?

Sure, that would be great.