Dynamic Groups Code Snippet confusion

Hi There

The manual is very cryptic when it comes to the descripton of how to use Dynamic tag selection on the Easy Chart control…

I don’t understand the code snippet that needs to be added to the Where clause… The manual just states the following

“Database pens have 2 ways to be made dynamic. The first is the Chart’s Where Clause property.
This is a snippet of SQL where clause syntax, like “machine_num = 28” that will be included for
all database pens in their queries.”

Please explain what the Machine_Num field is that is referred to or what field this where clause is applied on? I would have thought that the where clause would be something like WHERE TAGNAME LIKE’%Machine{Dynamic Property Value}%’. Surely the where clause is being applied to the SQL tag names or the Pennames allready added to Dynamic Groups or normal Groups inside the Chart control?

My requirement is as follows. I have many tanks that al have a ommon naming convention T1Level, T1Temp and T20Level, T20Temp etc. I want to open a popup containing the trend and just pass the tank number to it as a Dynamic property. It must just apply a Like clause, to dynamically add the 2 correct tank tags to the trend. So what would my WHERE clause have to look like to do this?

I could also use the Dynamic Groups but once again I am not sure what the text must contain that needs to be added to each Dynamic Group code snippet?

what I have done for similar issues like this is setup the easy chart component like you want for one of the tanks. Then you can go in to the cell update component and reference a dynamic property containing the tank ID on the screens root container. basically if you only need to replace the tank number delete it and link the dynamic property that contains the tank #.

check this out

This is from a quick tutorial I was putting together using dynamic groups bound to a value passed into the window upon opening.

in this example is our input value. This can really be any sort of string and you can use as many as you need to fully define the dynamic group.

Now, we can go back and bind the group_test1 property to an expression that creates the snippet.

More in a bit. Ran out of attachment space… :mrgreen:

Okay, I’m back!

Hope this helps you out!


Thanks for the suggestions. I will give it a bash.

Do any of you know how to use the option described in my first postingregarding the sniipet to add to te Where clause?

BigJoe - I have a feeling that you’re using SQLTag pens, not DB pens. The dynamic groups feature only applies to DB pens, which are for charting history stored in the database via a SQL Bridge historical group or similar, not the SQLTags historian.

The tutorial above is about as clear as it’s going to get for where the WHERE clause snippet goes.

To have a dynamic set of SQLTag pens that get controlled via paremeter passing, you’d alter the tagPens dataset (expert level property of the chart). This is where the cell-update binding might come in handy.