Perspective view params in embedded table row

Hello,
im using a embedded view in a table to display an alarmar in a row, each row has a diferente value that chanche a text field and a background image depending on a view’s value params.

theese are the view pictures and how it change depending param “criticidad” values
imagen

imagen

imagen

when i configure the table colum property it display like this


every row that i add displays the same view, at the moment im just trying to set one but there will be at least 20, with differents setups each and i’m strugled on how and where to asign differents params to each view per row. I found in the forum similars topics, but i couldn’t figure out how to set it up properly.
in the data property i tried the follows, non successful…
image
image
image

what am i doing wrong??
Thanks!

The Table only supports one View type per column, so I hope you mean twenty columns per row.

You don't need to modify the viewParams property of the column config unless you want to hard-code values across ALL rows.

When a column renders a View, the View will receive the value of the column within a param named value.

I have constructed a View named "Popup" (I'm sorry, but I was already looking into something else) which has one param named value. I am rendering the "population" column of the default data for the table as a View and I have specified the path to my View. I have not set any View params within the column configuration.

Current data structure:

Column configuration (note no viewParam settings):

Screen Shot 2021-08-04 at 12.31.22 PM

Instanced View param settings (note the param name is value):

Screen Shot 2021-08-04 at 12.34.36 PM

So what YOU should do is either...
A. Place criticidad at the same level as estado and valor, and change your param name to value...

OR

B. Leave criticidad as a child of alarma, and then change the column config to use alarma as the column, and your instanced View will need to expect a param structure of value.criticidad.

I recommend A.

Thanks a lot, option A worked great for me.

will there be a way to put the values ​​of 2 columns in a single view?

Only if you’re using a subview, which receives all of the data of the row. If you’re rendering a view in a column, then that view will only receive the data of the column for that row.

1 Like

If you add an empty object param named rowData to your view, the entire table row’s data gets passed into it. You would just need to know the key for the second column’s value you wanted.

I routinely use this to get some sort of unique identifier for the row I’m working with (e.g. id or name) so that I can call a message handler to update the data for the same row in the table from the embedded view.

1 Like

Thanks, that works for me :slight_smile: