I am trying to convert some old FactoryTalk View ME screens into Perspective screens. Having only done vision screens in the past, I am trying to implement functionality similar to a multistate indicator in FactoryTalk View and a list in vision. In vision in the Data property I can create a list of steps to be performed (basically a single column with multiple rows of text). Then I can bind a tag from the PLC to highlight the current active step in the list by binding the PLC tag to the Selected Index property of the list. As the tag in the PLC is changed, the item in the list with the same value is highlighted.
I am thinking that the best approach for this in perspective is to use a table component. The tag in vision that would get bound to the Selected Index property in perspective would get bound to PROPS.selection.selectedRow. The data would get bound from a memory tag of type Dataset or get manually created under PROPS.data as required. What I am struggling with at the moment is how to have the row highlighted based off the tag bound to PROPS.selection.selectedRow.
I was able to read through some other posts on how to change the background based off of specific data in a cell and I played with the example in the help for styling rows based on the value. My concern basing it off of scripting and a cells value is that say the list of steps is changed, then the developer needs to update both the data that is displayed in the table and the data to look for in the script to change the background color.
What I am hoping is that there is an easy way to do what I would like to do based off a change in the value of the selectedRow.
Can anyone provide insight as to if this best approach for this task in a perspective application or is there an easier way/component to use? Any direction, feedback, or guidance on where to look to find out more information is appreciated.