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