Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hello.

I'm also new to this forum =).

I hope somebody can give me some little hints how to solve my problem.

I want that I can easylie jump between my records. If I'm pressing the button "D" I want to jump to all record start with a "D.."

I'm from germany so I don't knwo how you call this funktion in a normal DB.

thx for help. wbr Rocco

Posted

Greetings and welcome to the forum.

This is a good thing to have, and is handy to have in many different types of applications.

I'm more familiar with FM6, and I'm also presuming that this will work with FM7. The concept will be the same I'm sure, just some things may need to be tweeked to conform with FM7 standards.

Let's suppose the field you want to seach in will be labeled "Name Last". First, create a calculated field that will contain only the left-most character of the name field. The calc will look like this -

Left ( Name Last, 1)

Then, you can perform a Find on just that Field for "A", "S", "V" or whatever letter you want.

Since you want buttons for each letter, The best way is to create a script for each botton/letter. You could use the "Perform Find" action so that it'll save your find request. The downside to that is that you'll have a lot of small scripts - one for each letter. But that really isn't a problem considering the convience of the buttons. You'll probably want to set the error capture on too, so if error code 401 (no records found) comes up, you can display a message like "Sorry, there are no last names that start with "B" or something like that rather than the bland error message that FileMaker will display.

Hopefully this helps.

Posted

Hey,

thx BrentHedden. For the first it works very well smile.gif.

But other ideas also welcome =) - may the best one win laugh.gif

thx. wbr Rocco

Posted

With FMP7 you don't need to create 26 different scripts, you use just one script and script parameters. I don't know how to get a script parameter, or a filed for that matter, into a "Specify Find Requests" dialog, so you'd have to enter find mode and use set field steps.

You don't need to create a calc field with just the first letter. Finds are capable of doing this with wildcards and exact matches. The find request would look like this: ==a* to find all records begining with 'a'. If you just use a* then is will find all records with any word in that field that starts with 'a'.

Also, the above method will not just jump to the first record starting with that letter, it will only show records with that letter. There's a lot of considerations if you want to jump to a record and still view all the records.

The simplest way to do it is to do the find, and then show all. The problem is that you might not have been viewing all records in the first place. Another problem is that the records might not be sorted by the field your interested in. To fix that you need to sort before your find.

If you want to restore your found set then you have to do some tricks, like flag every record in your current set and incorportate that into your find.

It seems to me there might be a better way to do this that doesn't require a find. Maybe a trick based on a relationship to a global, and using that to pick the record id of the record to go to. Don't know, I'd have to play with it.

Good luck.

This topic is 7405 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
×
×
  • Create New...

Important Information

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