Hello all, I'm looking to access the first (and what is highly likely the only) row in a table, but I don't now the table's key for each dynamic element the visio is used for.
What I was hoping there would be is a kind of alias for the real primary key - for example 0 or 1 refering to the first row, so I could access it with 'parameter': '1602:0' instead of '1602:RealPrimaryKey', but that doesn't seem to work.
I know I could use the children/child shape data to access the first row, but that seems really over engingered to get a single row.
Is there a simpler way?
Cheers, James.
Hi James,
There is a way to do this. You can use a feature of the param placeholder. If you are using the placeholder with an empty index, it will return all values. So you can do this with the primary keys and then use a filter in combination with a regex to only select the 'first' row.
TableRowFilter:1001=[regexreplace:\|(.*),[param:[this element],1001,],]
References:
Kind Regards,
Jarno
Hi James,
As far as I know, it is not possible to map a row from a table when you don't know the key. Possible solutions imply updating the connector:
- Currently you can map either the primary key or the display key from a table (see extended conditional shape). Maybe the connector can be updated to set as primary key column with '0' and the display key column with the current value?
- If we know that the table will only contain a single row, maybe we can use single parameters instead of a table to map these values?
Hope it helps.
Hi James,
An alternative could be to display the entire table using a "parametercontrol" shape, and sizing the shape so only the header and the first row are displayed.