June 16, 200817 yr 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!
June 16, 200817 yr 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.
June 16, 200817 yr 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. 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 June 16, 200817 yr by Guest
June 16, 200817 yr Oh hey, GadgetGirl! Welcome to FM Forums! 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 June 16, 200817 yr by Guest corrected typo ;-/
June 17, 200817 yr Author 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.
June 17, 200817 yr 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:
Create an account or sign in to comment