Hi Dojo!
I have a question regarding how to display specific rows of a table in Visio.
Here’s the scenario:
I have an element containing a table. In a service, I added this element with a filter applied to a particular row of the table, and I want only that row (on the Data) to be displayed.
To achieve this, I configured a children shape with the following Visio configuration:
- Children container
- Child
- Parameter
This setup successfully displays the row I want, but it also shows two extra rows that I’m trying to exclude. I have tried using options like ForcePropertyFromParent
but it doesn’t seem relevant in this case.
Is there a way to configure this to force only the row added in data to be displayed?
Thank you in advance for your help!
Hello Yahya,
The ForcePropertyFromParent option is indeed not relevant in this case. This option is used to change the context for placeholders like [this service], [this element], ... from the default object to the object which the shape, parent shape or page is linked to. See ForcePropertyFrom for more details on this option.
By default when generating shapes based on table rows, the service context is taken into account. In other words, if there is a service context, then shapes will only be created for rows that are included in the service.
This might however depend on how your service is created and how the filtering was done (based on primary key, display key).
A quite common way to deal with displaying tables on Visio for a service is to create or publish a service property containing the same filter as is applied on the service itself and use that property to filter the table correctly.
In your example, you can then use an extra SubscriptionFilter on the Group level shape data to filter the table correctly.
Something like in the example below:
In the SubscriptionFilter, you can filter on any column, display key or primary key. The above example uses the DisplayKey to filter on. More options are described in Dynamic Table Filter Syntax
You can also use wild cards or variables in the SubscriptionFilter. Note that in above example the service property is named "TableFilter" but you can name the property as you like off course.
Link to the documentation related to Group Level Shape Data when generating shapes based on table Rows including the SubscriptionFilter Option: Group Level Shape Data
Hope this helps!
The only placeholder that I know off is [servicedefinitionfilter].
It can be used to display a table parameter without specifying the actual key such that the same Visio file can be used for different services. The [servicedefinitionfilter] will be replaced with the actual row filter for that service.
It can be used e.g. in parameter shape data with Value:
"1603:[servicedefinitionfilter]"
Where 1603 is the parameter id.
But not sure if it applies in your use case.
Link to the documentation:
https://docs.dataminer.services/user-guide/Basic_Functionality/Visio/reference/Placeholders_for_variables_in_shape_data_values.html#servicedefinitionfilter
Hello Koen,
First of all, thank you for your detailed response.
I tried adding a subscription filter with the same filter applied at the service level (using the edit), and it indeed filtered out the unwanted child elements. However, my ideal goal is to use that filter without relying on properties. I attempted to find a placeholder that directly takes it, but I wasn’t able to locate one.
Let me know if you have any suggestions or insights!