Jump to content
Sign in to follow this  
Greg Hains

Realtime filtering

Recommended Posts

Hi.

I am looking to achieve a realtime filtering process whereby I have a drop down list displaying records of a field, and as the user types something only records with contents matching that in the field are displayed.

For example:

100 records with a field called "name" (very original I know). As I press "j" only records that have "j" in that field are displayed - not just the first letter but "j" in that records field. I then press "a" and the list shrinks as it finds "ja" etc etc.

I have seen a plugin demonstrate this (Fusion Reactor) but Im damned if I can get it going.

Whilst I now use FmPro 10 Advanced, many clients of mine still have version 9 so will stick to this version for this question. Has anybody written scripts or functions or the like that do this?

Please advise.

Greg

Share this post


Link to post
Share on other sites

Investigate this:

http://www.newcenturydata.com/downloads/filter.zip

Since you are on fm10, should you then consider, if the:

http://fmhelp.filemaker.com/fmphelp_10/en/html/script_trigg.38.3.html

...should take care of the "Commiting"?

--sd

Share this post


Link to post
Share on other sites

Thanks SD - I will check those out.

Also, any comments on the following possible methods? I have not tried them yet (just about to), but what about this:...

A field (using Script Triggers) whereby each time the data is updated in the field (ie. typing a new character) a Find is run, and the results are narrowed a bit. I would need to fiddle with the display side of things so it went smoothly, but might yield the desired results.

Feedback please.

Greg

Share this post


Link to post
Share on other sites

Yes, but where is the harm done in hardwiring the request by a "forked" relationship ... my take is that the relational method is a bit faster.

In my suggetion is the script a one-liner! You can take a look at this template see how:

http://www.kevinfrank.com/download/2009/dwindling-value-lists.zip

...here are the relations a tiny bit more reluctant to obey, and a stronger potion is applied! Commit records is all it takes in your case.

--sd

Share this post


Link to post
Share on other sites

Hi Soren.

Yes, that Dwindling Filter is a very useful function, but not quite what I am looking for.

My need was more to filter down in realtime as I typed from the keyboard.

Thankyou for your input - I will be able to use this in another area.

Cheers,

Greg

Share this post


Link to post
Share on other sites

Do not follow Soren's advice. Wrong example files.

You can do live as you type finds, they are surprisingly fast, and they do not clutter your relationship graph, they do no require portals.

http://www.excelisys.com/web/downloads/files/SearchFilter.zip

Share this post


Link to post
Share on other sites

they are surprisingly fast

Indeed they are - point taken, and somewhat much simpler to program! But my pointers to Kevins template was only to show how the event trigging bit of it was done - neither the dwindling nor that it was the single narrow path to follow. I apologise inadequate lingo.

--sd

Share this post


Link to post
Share on other sites

I'm trying to solve a very similar problem. hopefuly someone can help. Bruce, that SearchFilter example file is EXACTLY what I'm looking for - I ran across it awhile ago and have been playing with it. However, what I'm trying to do is to filter portal results in this manner, and that's the part I can't figure out.

To give you a better idea of what I'm trying to do; I've got a list of clients (names) in a column on the left of the layout, and clicking on one brings up their record on the right side of the layout. I've got that part done, using a portal to a TO of the client table as the left column and assigning the portal name field as a GTRR button. Probably clunky, I know, but it's the only way I could find. Now I'm trying to filter that portal down as you type, but I haven't had much luck.

Any help?

Share this post


Link to post
Share on other sites

Take a look at this. It's a nice demo on portal filtering (dwindling) as you type. Is this what you're looking for?

http://www.nightwing.com.au/FileMaker/demosX/demoX03.html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By Scott Pon
      Environment: FM13 with FM13 Server, mix of Windows 7 and 10.
      Is there a way to set a script trigger on if this portal row is new? IE, a script to run if this new child/portal record is new.  
      We have a parent record, and portal to Children records.  The children records have 2 fields: Profile Name and Process type.  Our user would like to enter a new child record (profile name and process type).  if the process type already exists, we will need to archive the existing record (matching the profile type).  There is more bI want to start with this first.
      I see script triggers to the layout "OnRecordCommit", but no similar script trigger for portals.  Any ideas on how to handle this?  Or am I going to have to add a button to go to another screen to accomplish this?
      Thanks.  I hope i gave enough info for you to help me.
       
    • By dav1089
      Hello,
      I want to create a script trigger which opens a layout based on account name ,create new record and put cursor in first field of the new record
      Now, I was able to direct user to specific layout and also created new record using New Record/Request function but somehow it doesn't put cursor in the first field , instead it selects whole record .
      Note: I also have script triggers attached to first and second field which runs on exiting the fields. (I don't think they affect anyways , but just mentioned to give idea)
    • By CRexen
      Hello everyone
       
      I am currently working on a database, which HR-Managers can access via WebDirect using login-information, to accede or resign their employees.
       
      I have made 6 possible option types for the HR-employees to enter data into, set by an unique ID, but with the use of the same fields.
       
      So...
       
      X fields with option type 1 (Accede)
      Y fields with option type 2 (Resign)
      Z fields with option type 3 (Maternity leave / leave)
      .. Etc. 6 option types in total.
       
      Now, based on my project description, a couple of the fields will have to be validated / not empty, which the HR-manager is prompted to enter before the record can be committed.
       
      Now, I am aware of FileMaker has it's own Field Validation, but I think the built in feature is bonkers..... (Sorry FileMaker..) 
       
      Therefore I was thinking of making a script to each of the different fields, which needs validation, and is this even a good solution
       
      Question one; how do I do this, the most easily? Is it possible?
      I have 8 required fields for validation, fields are global.
       
      Fields such as; Company Name, HR-manager name, HR-manager e-mail, employee SSN, employee name, employee surname etc. 
       
      I don't want the scripts to interfere with the other option types ( X, Y, Z ) which each is set by an unique ID, as well as fields, although the fields used in these option types are from the same table.
       
      Please see attached images of my setup.
       
      Hope you can help me, for the best possible solution.
      If you need more information, let me know.
       
      /Cheers
       
      P.S. The language/text on the layout is Danish, although shouldn't be considered an issue for understanding my problem.



    • By Dana G
      Purpose:  To capture the contents of a field before it is changed.  Compare the before to the after.  Highlight the after and screen capture then export.
       
      I can't get past the first sentence and it's getting frustrating because it seems extremely simple.
       
      1 Field:  OnDeck_t (text)  -  The OnDeck_t field data = On
      2 Field:  OnDeck_before (Where I want to capture the OnDeck_t before it's changed)
       
      I have an OnObjectEnter script trigger on the OnDeck_t field that runs this script:
      Set Field By Name [substitute (Get (ActiveFieldName); "_t"; "_Before"); Get (ActiveFieldContents)]
       
      If I do this it works fine.  (But I don't want it hard coded.  I will be using it for all the fields on the layout):
      Set Field [OnDeck_before; Get (ActiveFieldContents)]
       
       
      I have divided the Substitute (Get (ActiveFieldName); "_t"; "_Before") and Get (ActiveFieldContents) into separate lines in Data Viewer and both return expected results.  Why doesn't it work when it's part of a 'Set Field by Name' script step?
       
      Thanks.
    • By scoony
      Hi,
       
      I'm new to the forum so apologies if I have put this question in the wrong section.
       
      What I am attempting to do: I want to create a 'home page' that each consultant sees when the database opens on an iPad. The home page should have two pop-up menus, Client and the other Contact. For context, each Client with have multiple Contacts (generally employees and contractors) The consultants in the office want to be able to navigate to a Client they select from the pop-up menu on the 'home page'. The same process applies to the Contact pop-up menu. 
       
      Many thanks if anyone has ideas how to achieve this. 
×

Important Information

By using this site, you agree to our Terms of Use.