I'm trying to follow this guide but got stuck on a few things.
Ignition Perspective: How to embed views in a table
First I had to redo the embedded View as I'd not selected the Flex Container type. I could not find a way to change it. You can copy the JSON info from the old View but then the objects still have the old none flex settings.
To get it to look like a text field or dropdown is not a separate object in the table you need to add styles to the dropdown object. Under TextField
and Dropdown
PROPS
style
I added, backgroundColor
: #00000000 and border
: none
I have a perspective table that is currently using an onEditCellCommit
script to update a tags property by changing the text in any cell in a column. It gets the tags path from the only other column.
I was thinking I'd just be able to pass the new value from the view into the tables cell and trigger the same onEditCellCommit
script that is already there but I did not have any luck. I also tried moving the script in the onEditCellStart
script.
I ended up moving the onEditCellCommit
into the Message Handler script and it's working with the TextField
view.
Testing with a TextField
in the view I can see the current value in cell just as though the TextField
view was not there. This is what I already had without the view, the column was set to editable
and the onEditCellCommit
script updated the dataset but I'm wanting to use a Dropdown
view in each cell with a list of options.
The TextField
used the expression binding but the example skips over the Dropdown
s, value
and options
bindings.
I can't get the options
or the current value
into the Dropdown
view.
I tried to use the same binding as the TextField
, text
for the Dropdown
, data
but even if I don't use a binding at all and just hard code the value
as "test" it still just shows "Select...".
For the Dropdown
options
, the example shows the columns
options
under viewParams
as a dataset but I can't seem to set it as a dataset.