Jump to content
Sign in to follow this  
GadgetGirl

Showing selected records on a layout

Recommended Posts

Disclaimer: I came from a Microsoft Access background and was quite proficient with it. Now I'm in a Filemaker world and am still trying to figure out how to do some coding techniques that I used to be able to do in my sleep!

Here is today's problem. I want to open up a layout and only display the records that don't have data entered in one particular field. It is a list of residents who are due to be retested. If they are no longer eligible for testing, then I fill in a "date testing terminated". So I want all of the records that don't have this date filled in to appear.

Thank you in advance!

Share this post


Link to post
Share on other sites

Create a script.

Go to Layout [LayoutName]

Enter Find Mode

Set Field [ date testing terminated ; "==" ]

Perform Find

Set that script as your file's opening script (File > File Options)

I hope that helps. Let me know if you need more details!

The set field step:

The field you are setting is "date testing terminated"

You're setting it to the following calculation:

"=="

which looks for empty values in that field.

Share this post


Link to post
Share on other sites

You can shorten that a bit by leaving off the Enter Find Mode[] altogether if you use instead a Find Request as:

Go to Layout [yourLayout]

Perform Find [ Restore ]

... find request would be: date testing terminated =

... in other words, specify a find request, select your date field then type ONLY [color:green]= into [color:red]the find criteria box and hit ADD. It's a small few changes but can save time over the long run once you get used to using it. :wink2:

CORRECTION IN RED: I had typed 'field' and I meant 'the find criteria box.' Sorry about that. Also, one equal sign will do it.

Edited by Guest

Share this post


Link to post
Share on other sites

Oh hey, GadgetGirl! Welcome to FM Forums! :laugh2:

I should also mention that you should trap for 'no records' yourself.

Go to Layout [LayoutName]

Set Error Capture [ On ]

Perform Find [ Restore ]

If [ not Get ( FoundCount ) ]

Show Custom Dialog [ OK ; "No records found." ]

Show All Records

Go To Layout [ original layout ]

Halt Script

End If

... records found, do whatever you wish with them.

Edited by Guest
corrected typo ;-/

Share this post


Link to post
Share on other sites

Whew! Thanks! I had only seen the first response and tried it and it WORKED!!! Oh Happy Days!

Now I see there are other ways to refine my script - Thanks for the tips!

Thanks for the welcome! Sure wish I had found this forum about 2 years ago!!! I've finally starting to like FileMaker instead of wishing that I could still use Access.

Share this post


Link to post
Share on other sites

Plug in here at FM Forums and you will have thousands of wonderful people to assist you. You couldn't ask for a better place to learn and get assistance. The brightest minds in FileMaker hang around here. And so do I! :jester:

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.

Guest
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.