Jump to content

Find as you type?


This topic is 7146 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is there a method where you can place a text box in the header the layout in "View as list" type format and as you type letters the cursor will go to the closest related record in the list below? If you have seen the Palm Desktop, I am talking about the way it deals with Contacts.

Sorry if the wrong forum.

Link to comment
Share on other sites

I find your question interesting, as it covers something that I think not only most FMP developers, but also users would greatly welcome. Unfortunately, as with so many other things to do with FMP, there is a compromise to what you want but not really an answer. The best I can think of is as follows.

Lets say you have a surname field, and want a list of surnames where you can reference by letter. Create a calculating field (CALCNAME) that is set to the following:

“All” & “ par.gif ” &

SURNAME & “ par.gif ” &

Left(SURNAME,1)

This would give you a result – with the name smith, for example, of:

All

Smith

S

(You can take this further if you want, by adding further letters to the second part, e.g.B)

“All” & “ par.gif ” &

SURNAME & “ par.gif ” &

Left(SURNAME,1) & “ par.gif ” &

Left(SURNAME,2) & “ par.gif ” &

Left(SURNAME,3)

Etc. resulting in:

All

Smith

S

Sm

Smi

And so on.

Now you need a global field (PICKNAME). Set this to a drop-down menu using your calculating field. Now create a relationship = PICKNAME::CALCNAME sorting by CALCNAME

Now drop a portal onto your layout based on this relationship. If you click on the PICKNAME field you can choose “All” which will show all the names in your file, or choose a name, or the first 1 or 2 or3 letters for all names in that range.

This isn’t exactly what you wanted, but about as close as FMP can get – sorry!

Rigsby

Link to comment
Share on other sites

Again, this is not exactly what you wanted, but it might help. It's a workaround I developed when I didn't want to lose sight of the found set by going into Find mode.

Create another file, NameSearch, which just one field, Name, which contains the same data as Name in your first file. Relate the two files. Hide the status area, toolbars etc. and match the background to the header in your first file. Size a window for NameSearch to be just bigger than the Name field. Create the following script in NameSearch:

Enter Find Mode

Pause/Resume

Perform Find

Sort (restore an alpha order, no dialog)

Go to Related Record (Name of Relationship)

Place a button in the header of your first file to trigger this script:

Perform Script(External, Name of script in other file)

Go to Field(Name)

When you perform this, a little 'search' window will open in your header and you can generate the find by pressing 'enter' after typing as many characters as you want. The sort step in the NameSearch file ensures that you will go to the first instance of the name by alpha, even if the records in your first file are not sorted. Go to Field in the script of the first file will take your cursor to the relevant record.

Dunno, maybe you can improve this by combining it with Rigsby's method?

Link to comment
Share on other sites

This topic is 7146 days old. Please don't post here. Open a new topic instead.

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
 Share

×
×
  • Create New...

Important Information

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