\"filterRows\" with including-pattern AND excluding-pattern. How to?

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
frankySie
Posts:30
Joined: Mon Oct 15, 2012 12:01 pm

\"filterRows\" with including-pattern AND excluding-pattern. How to?

Post by frankySie »

A table has 2 columns.

Now the table should be filtered and the method "filterRows" is applied.

--- shape.filterRows(dyn_string columns, dyn_string patterns, bool show); ---

The column 1 should show a filtered information.

The column 2 should NOT SHOW a filtered information.

How to realized such a filter?
Or, is there another solution to apply an including-filter AND excluding-filter at a table?

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: \"filterRows\" with including-pattern AND excluding-pattern. How to?

Post by Gertjan van Schijndel »

I guess the only way to apply such filtering is to manually go thru the table and use 'showRow' or 'hideRow' to only show the rows that match your filter.

frankySie
Posts:30
Joined: Mon Oct 15, 2012 12:01 pm

Re: \"filterRows\" with including-pattern AND excluding-pattern. How to?

Post by frankySie »

Thx for the answer. Well, your solution seems to be the only one.
I thought about it. A disadvantage is the performance. Table manipulation in a for-loop is really slow in Wincc oa.

Or:
another way would work: all table-information is hold in dyn objects. Then the dyn objects are filtered. At least the table is written.
But even this solution has bad performance if the table is used in a callback method.

Typically the table needs to be updated 2 x per second.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: \"filterRows\" with including-pattern AND excluding-pattern. How to?

Post by Gertjan van Schijndel »

To increase the table performance you could disable the table updates with 'updatesEnabled' before your table manipulation and enabled them afterwards again.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: \"filterRows\" with including-pattern AND excluding-pattern. How to?

Post by leoknipp »

Hello,

if the table contains a lot of information and will be updated 2 times a second maybe it will be difficult for the user reading the displayed information.
Especially if the table is srolling automatically when new information is added to the table after the user has changed the position in the table.

Maybe you should think about a longer update interval of the table.

When using a dpQueryConnectSingle() to get the updates for the table you can define a blocking time. Then you get the collected information after the blocking time and the callback method is not called for every value change.

Best Regards
Leopold Knipp
Senior Support Specialist

5 posts • Page 1 of 1