April 15, 200322 yr Newbies I am looking for a method of sorting a catalog of data. I like the idea posted by DatabasePros.com titled Substitute Portal Filter. Their example file shows how to filter a portal, but I would also like another filter. I would like to filter it by a wage within a given range. For example, if you were to assign a wage to each of the volunteers(yes, I realize they wouldn't be volunteers any longer ; ). Then with the filter you could enter in a wage and then check a box to look for values within a range. For example, you could enter $50 as the wage and click a check box to search for wages within +/- $2.50, or another check box for $5.00, $10.00 etc... thus filtering the portal only showing the volunteers within that range. I have setup a file which uses a calculation field and the loops through each record to see if the wage is within the range, but that gets very slow when you have more then 20,000 "volunteers". Is this possible using a filter? What is the best/quickest method to filter this list?
April 16, 200322 yr for situations like this i use a kind of "illegal" trick. I simply limit record acces in the related file fo records that match the current criteria. the formula looks somewhat like this: if(isempty(main::portalfiler);1;wage>(50-2.50) AND wage<(50+2.50). I posted a sample file here: http://www.fmforums.com/threads/download.php?Number=62128
April 16, 200322 yr Author Newbies Thanks cjaeger for the post. The file was password protected so I was unable to see your field descriptions. I'm not familiar enough with limiting record access to see how that would apply to my filtering a portal. I'm attaching 2 sample files(zipped) I put together using cars as an example. filea.fp5: Is the main file to be used. I would like to select some criteria. and then see a list of matching "makes". Then I would like to select a Make from the list and be able to select a "mode" based on the make. I understand how conditional value lists work, but am getting confused with doing it within a filtered portal. fileb.fp5: just holds the data for "makes" and "models" I also am getting to many keys. If anyone can explain what I'm doing wrong, I would be forever in debt. Thanks, Chris multikey.zip
April 17, 200322 yr sorry, had the password in the original post. password is "master" . also corrected some quirks and added short description. I used this technique on a file with 180000 records. first I forgot to limit the filtering, openting took 5 mins on a P4/1200. then I changed the calc to apply only on a specific layout and only if the find criteria field is set. opening time was normal and portal filtering took only a tenth of the time it takes to do a comparable find and setting a flag with replace(). recordfilter.fp5.zip
April 17, 200322 yr to solve your files using the portal filter techniques: you can simplify the calcs when you categorize your allowed price ranges < 1000 -> A 1001 ... 200 ->B etc. and do those calcs in the cars file.
Create an account or sign in to comment