Jump to content
Sign in to follow this  

view only 1 record

Recommended Posts

I'm building a database for my insurance office, with fmaker pro 8.

It may sound to you like a silly question, but... that's how it is:

I've build the dbase with, lets say, 1 table (=clients). I perform a find request (for example, based on name = john*). The found set, includes 12 records. I have add buttons in the results page list (table mode layout), so when you press the button "details" of a found record, the layout moves to the full-view mode (form mode layout), right on the record I were viewing.

All I need is to be able to see ONLY this record of the found set, when I press the "details" button. I don't want the mouse roller to move me back & forth within the found set. Plus, I don't want to disable the mouse roller function.

I'm asking that, because I need to add this script to the "add new client" button. So when I create a new client, the browsing mode won't move between the records, until the user presses the "finished" button (= to end filling up all the infos).

Share this post

Link to post
Share on other sites

What is the script you are using on the Details button?

Is it GTRR (Go To Related Record)? If so, make sure you have checked:

"Show Only Related Records"

"Match current record only"


Share this post

Link to post
Share on other sites

I do exactly that!

The thing is that it still gives the "mouse-roller back-forth to records" option... (found 12, total 53)

How can I view just the 1 record I need to see?

Is this some sort of bug?

I have already the most updated version = FileMaker Pro 8.5.2 Advanced

Share this post

Link to post
Share on other sites

You need to OMIT all records except the one you're viewing.

Show All Records

Omit Record

Show Omitted.

Add that to your details-viewer script.

GTRR works if you're going between related tables, you can choose to show only the parent record or view only the children.

Share this post

Link to post
Share on other sites

There is a big question, which is, "Do you care if you lose the found set?" If you're creating a new record, then perhaps you don't care, and it's easy to have a found set of only 1 record. If however you want to flip back and forth between viewing a single record, in a found set of 1, and a list of some found records, then you've got more of a problem. Because going to a form view does not change the found set.

I agree that the scrolling records can be distracting on Windows (not on Mac; so it's likely an OS thing, not FileMaker in particular). It would be nice if FileMaker added another option to the Layout settings (either layout-specific, or application wide), "Do not scroll through records in Form view". But who knows how easy that would be, it being an OS thing.

I can think of a few ways to do it, each with its own pros and cons:

1. Create a Form view layout where ALL the fields are based on a relationship from a global ID field. You'd set the ID from the record in List view, or after creating a new record, Commit Record, then flip to that Form view layout. You'd only see fields from that one record. You could still scroll records, but you'd still only see that same one record. It would work, but look weird to the user; not my preference.

2. Use a New Window. Then you could do as above, set a global, Commit Record, then:

Go To Related Record [ Show only related records, new window ]

You'd want to script this, so you could control the new window, its size and position, etc.. You'd likely want to trap them on that window, using a Loop, Pause. You'd want a button on the layout to Cancel (or Return), closing the window, with the option to Exit or Halt Current script (otherwise you can get stuck in the Loop).

Add an SetUserAbort [ Off ] to the script, but only AFTER putting that button to cancel. Don't ask how I know this :)-]

The only real "con" of this method is if you're trying to keep windows maximized on Windows, but you want this window to be a specific smaller size. It can still be used, but takes more steps to; 1. Keep the background windows from going wonky, and 2. Re-maximize afterwords.

Or don't make the new window any specific size or location, just let it cover the screen.

3. Use a method to save the found set, then narrow it down to one. Then, when you're done, restore it. This is actually pretty easy to do, using a cool trick (don't know who originated it).

To do this you need another table occurrence (TO) of the record's table. But it should NOT be attached to any other TO, ie., no relationships. Name it with _FS, so you know what it is. Create a layout based on it. It doesn't need any fields on it, but I usually put the ID field. Add _FS to the name.

Let's say your current layout's table occurrence is "Dogs". The below will save your found set.

Go To Related Record [ Dogs, Show only related records, layout: Dogs_FS ]

Go to Layout [ original ]

The below will restore it:

Go to Layout [ Dogs_FS ]

Go To Related Record [ Dogs_FS, Show only related records, layout: Dogs ]

The logic: Using the current table occurrence as the relationship in Go To Related Record seems redundant, since you're already on those records. But using a different unconnected layout as the target copies the current found set to that layout; where it basically just sits. Then you return to the original layout, and change the found set.

When you want your previous found set back, you go to the FS layout, where the found set is sitting, then use the trick in reverse. Go To Related Record of the FS TO, but target the regular layout, which copies the previous found set back to it.

It's pretty fast. It would need to be scripted, and you'd need a button to restore the found set. But it does not need to be done in a new window (would be redundant in a new window), hence doesn't mess with maximize.

The attached file uses the method for Find; but it's the same thing (more or less).


Share this post

Link to post
Share on other sites

... or hide the status area.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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