Jump to content

Showing selected records on a layout


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

Recommended Posts

  • Newbies

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!

Link to comment
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.

Link to comment
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
Link to comment
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 ;-/
Link to comment
Share on other sites

  • Newbies

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.

Link to comment
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:

Link to comment
Share on other sites

This topic is 5784 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.