I generate shapes based on table A, containing columns A1 & A2. Another table, table B contains columns B1 & B2.
A2 & B2 could contain the exact same value.
I have managed to get the generated shape to show the value of A1 and the corresponding value of B1 if there is a corresponding B (A2 == B2) row. However now I want to set two card variables, each with the values of A1 and B1 by clicking the generated shape but I only manage to set A1. So I can show the value of B1 in the generated shape but not set a variable to its value.
How should I go about this?
Yes, the problem is how do I get Index2? Index1 is just [tableindex]
How did you get to visualize the value for index2? I think it would be something similar to that.
That was my idea as well but after trying for several hours I’m out of ideas.
The way I visualise it is: The child group (the group containing the shape data ChildType:Row) contains another group. This group only has the shape data Enabled:True and Options:NoCopyElementProperty. That group then contains a child shape with the shape data Element:1/259, Parameter:B1, ParameterSubscriptionFilter (VALUE=B2==[Param:1/259,A2,[tableindex]]), as well as Enabled:False and Options:NoAlarmColorFill|NoCopyElementProperty. The child shape shows the correct parameter if I add an asterisk * as the child shape text.
Hi Robin,
Has Toon’s answer helped you find the solution? If so, could you select the answer (using the ✓ icon)? If not, could you elaborate on which problems you still encounter with his approach?
From what I can tell with the info we have gathered together in the question and comments, I feel like it will be very hard to set your 2nd variable without some shenanigans. The problem, as you probably realized, is that while the param placeholder can take into account SubscriptionFilter shape data, it will be applied to both your SetVar values. i.e. if you have varA:[param:1/259,A1,[tableindex]]|varB:[param:1/259,B1] a subscriptionfilter like VALUE=B2==[Param:1/259,A2,[tableindex]] would be applied to both of your param subscriptions and while that would fix your varB, it would at the same time break varA.
However, I like to claim you can do anything in Visual Overview, so probably executing a script upon click could help you out. Pass the necessary info to your script and use the functionality to output script variables to then populate the necessary variables. Hope that helps you further.
EDIT: Looking at the code, I feel like the solution I offered in the first paragraph with subscriptionfilter (yes, the one I said wouldn't work) might work after all. We first verify if there is a table index already passed in the param and if so, we should be skipping the subscriptionfilter shape data. So for the first param it should use the index directly and for the 2nd one the subscriptionfilter. Let me know if it works!
Probably I’m misunderstanding the question, hence no answer. But to me it sounds like you just want to set 2 variables with a SetVar? e.g. “varA:[param:A1,index1]|varB:[param:B1,index2]”. Probably you are missing one or more of these inputs, but I’m not sure which.