Ok, so here is the thing that my colleagues and I figured out and believe is under documented in the ignition documentation.
Here is what you have to understand:
Whenever you see the viewParams property in a table component whether it is under the columns property or the row property, you have to understand that when a page loads, ignition will always put a parameter called value into viewParams even if you haven't defined it in the designer.
Let me provide some examples:
In the columns section after you render the cell as a subview, you don't have to pass any parameters. This is what you should have.
viewParams = {
}
What your embedded view actually receives when the page loads looks like this:
viewParams = {
value:
}
Note, you never told ignition to pass this, but it does anyways and even if you tried to pass in your own field called value, ignition will override this with the value from the cell.
If you are trying to pass data from the rows section, the value is actually an object containing the field names of all your columns. For example
Your definition of view params under the rows section of the table in the designer is:
viewParams = {
}
What the subview actually gets is:
viewParams = {
value: {
col1: <col1's value>,
col2: <col2's value>,
and so on
}
Note, in your viewParams, you didn't actually define anything, but once a page loads, they are there, even if you can't see it. Now to actually get access to this value in your subview, you have to put value in Params. Then you can bind your components to these.
Params = {
value:
or if from a row
value: {
col1FieldID:
col2FieldID:
}
}
Now you might be wondering why viewParams is even there in the first place, this is your opportunity to essentially pass constants or values that may not necessarily come from the table itself.
I hope this helps clear up any data passing issues to subviews from tables.