Looks like... Perspective maybe? Is your progress bar a view? If so, create A param called rowData as an object and add the keys from the row dataset you want to pull in to use
Make sure that you name the field. (It looks like you have.)
Tell it to render as a number.
Tell it to render numbers as progress.
Set the range.
For the range, I thought it would auto-scale based on the maximum value. I think this might only be for datasets and the sample table component data in this case is JSON. In your case it doesn't matter as long as you don't expect to display over 100%.
Thanks! Not sure how I missed that built in feature. Looking great just have to figure out my indirect binding for it now based on the 'LineID' value of the row.
Why not make the LineID a parameter for the view, and then use that in your indirect bindings. Then instead of copy/paste the binding 29 times, just use the same view and send the appropriate parameter value?
Perhaps, I don't understand what you mean when you say Dataset. When I say dataset, I mean an object containing potentially multiple rows of data, which is often bound to a tables data property. Is that what you mean?
Yes.
I can, but it will not be until later, unfortunately. If no one else has offered help by then, I will see what I can throw together.
Wondering if you can help me solve this next problem. I am doing an event script for my table onRowClick so that a Popup action happens with more details of the progress.
I have the onClick working and Popup windows is already configured. The issue comes when I am trying to pass the LineID value of the selectedRow.
{/root/OEEProjectTable.props.selection.selectedRow}
-The above only returns the index value of the selected row.
{/root/OEEProjectTable.props.data[0].LineID}
-This actually returns a LineID value and passes it into my Popup but is limited to being hardcoded to row 0 data.
Is there a way I can combine both to have the value of the data in the selected row?
So what @lrose is saying is that instead of making one binding at a time, you can create one script binding on the data prop. It accepts an Ignition Dataset or a dictionary structure.
I'm assuming here you have a custom prop with just the base tag path, "[Application]OEEProjectTracker". Here you'd create a project script function that takes that path and:
loops over all the tag paths to make a tag list
grabs all the data from those tags at once using system.tag.readBlocking
packs those into a list of rows, e.g. [areaName, lineID, quantity, progress]
converts that list into a dataset using system.dataset.toDataset()
returns that dataset.
Your binding would then automatically apply the dataset to the table, giving the same results you already have but a lot less manually.
I was actually about to look up which one was more performant, I know they're technically both terrible for performance if overused but I never remember which is less bad.
EDIT: Yeah, found the thread. Something about transforms adds a really nasty bottleneck to execution. Nothing that matters if your script only executes once every second, but adds up if you have multiple.
As a bonus, with runScript() you'd be able to set up a polling rate naturally, whereas with the script transform, you'd have to call now() in the base expression since otherwise it will never refresh.