So maybe I am misunderstanding how this works but I have a on propertyChange script on a Vision Template that runs each time a UserChoice template parameter changes (which is later bound to a dropdown list in an overview screen). On this template I have a Internal Property that is a dataset which is a single column and possibly many rows that pulls data from a Named Query based on the user selected. The on propertyChange script is supposed to change the background color of the template based on the results of the dataset and the UserChoice parameter.
My propertyChange script looks like this:
propertyName = event.source.UserChoice for row in range(event.source.IncompleteJobs.getRowCount()): for col in range(event.source.IncompleteJobs.getColumnCount()): event.source.background = (255,255,0)
I thought doing this would allow me to highlight only the Jobs that match a row in the dataset however when it runs all of the Jobs highlight since this loops through the dataset.
I even attempted to change the on propertyChange script to work as follows but it returns an error:
propertyName = event.source.UserChoice for row in range(event.source.IncompleteJob.getRowCount()): for col in range(event.source.IncompleteJob.getColumnCount()): if event.source.UserChoice == event.source.IncompleteJob.getValueAt(row, col): event.source.background = (255,255,0)
Any suggestions on what I am doing wrong?