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?
\"filterRows\" with including-pattern AND excluding-pattern. How to?
- frankySie
- Posts:30
- Joined: Mon Oct 15, 2012 12:01 pm
\"filterRows\" with including-pattern AND excluding-pattern. How to?
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: \"filterRows\" with including-pattern AND excluding-pattern. How to?
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?
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.
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?
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?
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
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