What's the best way of having a shape execute a SET command (or automation script) where the SET command includes a parameter retrieved trough a SubscriptionFilter on the same Shape? Cube only opens the element from the Element shape data and doesn't execute the SET.
Do you have to do it differently if the shape is part of a children row?
The shape also uses the Show/Hide shape data which uses the parameter that SubscriptionFilter generates.
Like so:
Parent Shape Data
SubscriptionFilter: VALUE=2 ==[Param:1/20,10,[tableindex]]*
Element: 1/1
Parameter: [Param:1/1,2,]
Enabled: False
Options: AllowInheritance=False
Child Shape Data
Execute: SET|1/1|53:[Param:1/1,2,]|NewValue
Enabled: True
Options: AllowInheritance=False
Hi Robin, I have tried this myself and it seems to be working when having just one shape in a group (ref. if you would need this in dynamic children shapes).
Group
Element: [this element]
Enabled: False
Child Shape
SubscriptionFilter: VALUE=302 ==West
Execute: SET|[this element]|354:[Param:[this element],304,]|5
Enabled: True
Options: NoCopyElementProperty
Important: The text of the Child Shape contains '[Param:[this element],302,]' which is as replacement for the 'Parameter' shape data.
Parameters in my use case:
- Table 'Sites' : PID 300
- Parameter 'Location' : PID 302
- Parameter 'Consumption' : PID 304 , Write PID 354
As you can see in the below GIF, I have made an atypical use case just to prove it is working. As you can see below, I am filtering down the row with 'Location' (PID: 302) being 'West'. The Execute action is doing a set on a different row (refer to the param placeholder, Parameter Consumption is set to value 3 which is the PK of the third row) on parameter 'Consumption' (write PID: 354) with value 5.
For the question on Children's shapes, it's hard to tell without seeing the real use case and table constructions.
Hope this helps you further!
Kind Regards,
Jarno
Hi Robin,
If I understand correctly you don't need a 'hyperlink' or any action on the shape displaying the parameter value? If so, I would make a different 'overlay' shape with the SET action display with 99% transparency above your displayed shape. This way your 'hyperlink' will link to the set action. As a tip, to avoid the inheritance from the parent, you should use AllowInheritance=False option on the shape with the SET action.
You can still use dynamic child shapes (e.g. based on rows). Typically there's a group representing the dynamic shape/row, and inside the group, you can add the shapes you want.
Kind Regards,
Jarno
Hi Robin, Are you saying that you’ll need the filtered displayed value in the SET actions (in the NewValue of the below syntax)?
Set|DmaID/ElementID|ID of write parameter:TableRowKey|NewValue|Options
Almost. I need it instead of TableRowKey, not NewValue.
Hi, I will post a new answer.
Hi Jarno. I don’t really follow, how does the overlay shape with the SET action get the parameter value from the “underlying” shape which contains the Element, Parameter and SubscriptionFilter shape data? I was under the impression that it could only be passed one-way, from parent shape to child.