Pass parameter into embedded view table

Wow. There's a lot to digest here...

I can't even begin to list the reasons, but you have to understand that when you're dealing with many different pieces of software, you have to use languages that easily interact with all of those pieces, AND which users can "easily" pick up. Java and Python are two of the biggest languages, and so Jython is a natural bridge. When it comes to Perspective, CSS is going to be handy to understand because you're dealing with web content. That's just how it is; nothing we can do on our end is going to make it so that you won't need at least these languages.

Your script example is a little odd, and doesn't quite line up with what's expected for data if you're trying to supply an array.

The Table's data array expects an array of objects. Each object can have 0-to-many keys within, where each key itself has a value which could be a primitive value or a complex object.

# This array has two objects. Object 0 has two keys which contain primitive
# values and one key which contains an object. Object 1 has only one key
# which is a primitive value.
data = [{"keyOne": 1, "keyTwo": "two", "keyThree": {"innerOne": True}}, {"keyOne": 2}]

In your example, the first object in the array contains an array of objects, where each object contains a key which is the column name. That isn't any good to you or the Table.

Try this:

pyData = system.dataset.toPyDataSet(value)
dataAsArray = []
for row in pyData:
    new_dict = {}
    new_dict["workOrder"] = row[0]
    # do ^^^ this previous line for each column you want in your data
    timeIn = row[3]
    timeOut = row[5]
    new_dict["timeIn"] = timeIn
    new_dict["timeOut"] = timeOut
    new_dict["progress"] = {"timeIn": timeIn, "timeOut": timeOut}
    dataAsArray.append(new_dict)
return dataAsArray

This should get you data of the shape:

data = [{"workOrder": <workOrderValue>, "timeIn": <someTime>, "timeOut": <someOtherTime>, "progress": {"timeIn": <someTime>, "timeOut": <someOtherTime>}}]

In your second example, you are returning the dataset IMMEDIATELY, and so your attempt to return newData will NEVER be reached. Remove the return value line and you'll see a difference.