Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11712

Re: Data syncronize by using component (mathcad 15)

$
0
0

S Kim wrote:

 

Hello Werner,

 

I am trying with your helpful example and here, quick question.

 

Is there any limitation to have list boxes?

I was on making list boxes which are more than a dozen and faced definition error.

The error mark was on the term "Filter" in Filter(Data,stapeln(,,,,))

 

So.. any limitation?

Thank you so much.

 

S

There is no limitation for the number of listboxes that I would be aware of.

Maybe its a wrong usage of my routine Filter.

Filter ist a function with two arguments, tbl ist data table without row or column headers and flt ist a vector with data values used to filter the table.

Filter takes the value of the first element of flt and deletes all rows in the table which do not contain that value in the first column. Then it takes the second value in flt and additionally(!) deletes all rows which do not contain that value in the second column, and so on. When its through with that procedure it will return the next column of the table.

So when we go the listboxes from left to right in the example sheet, the result of the last listbox is added to filter argument using stack(stapeln in your German version), so only values are presented which correspond to the values selected before.

The routine was a quick hack without any error handling. So you have to ensure that the values provided in flt really exist in the appropriate column of the data table and that there is a "next" column which can be returned.

 

The listbox itself and the script used within is fairly basic and more or less copied from Richard's fine selection of components. Its the Filter routine which ensures that only the appropriate values are shown. I don't feel that comfortable with scripting components but I guess that the filtering may be done even more efficiently inside the component itself by appropriate scripting.

 

BTW, What was the error message you got?


Viewing all articles
Browse latest Browse all 11712

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>