Context: I have 2 row selector components that I am using to populate an easy chart. The logic flow is 1 of the selectors is a list of tags which are present in a transaction group. The tags selected there are then used to query the db which feeds the easy chart. The other row selector is used as a “quality of life” choice. It is where user made grouping of tags are stored so the user does not have to manually select a routine group every time. Ideally the group selected would also show the selected tags in the 1st row selector. I have a way to make the dataset which is idential to what the .dataOut would look like for row 1 if said data was selected but I can’t seem to bind or or write to the .dataOut of row 1. Anyone have any ideas?
TLDR:
I can’t seem to be able to write or bind the .dataOut of a row selector. It might be constantly writing to it which is overwriting any one time changes.
Specific info:
My prop (row selector 2) activates a prob change event which populates a custom property called “test.”
row selector 2.dataOut is bound to test but is not showing the same data
test data:
valid_keys = set(ds1.getColumnAsList(2))
headers = list(ds2.getColumnNames())
data_out = []
check_col_index = 2
for i in range(ds2.getRowCount()):
val = ds2.getValueAt(i, check_col_index)
if val in valid_keys:
row_data = [ds2.getValueAt(i, c) for c in range(ds2.getColumnCount())]
data_out.append(row_data)
return system.dataset.toDataSet(headers, data_out)
After getting some help from a reliable source, we were able to find a way to change the logic via the code below. I am running into the issue of property change scripts not running after updating the data. Anyone have any idea of how to manually trigger prop changes?
from com.inductiveautomation.factorypmi.plugins.reporting.components.rowselector import RowFilteredDataSet
I tried using it in preview mode and implemented the code above into a button which I then tested in a vision client. Neither worked sadly. After taking with IA support, we came up with a work around as it seems currently it is not possible to write to the .dataOut of a row selector.