Akak Posted February 29, 2008 Posted February 29, 2008 I've had this same problem with several databases and I'm wondering if I'm doing something wrong or if I've stumbled onto a bug in FMP. I'll use my simplest DB to illustrate the problem. I know that the explanation that follows is long, but please, I'm not good at simplifying and I really do need help here. I have a simple DB I use to keep track of my To Do lists and projects. I have separate tables for Projects and ToDos. I have a portal in Projects that I use to actually create my To Dos. While I need to determine what my To Dos are in terms of projects, I determine when to actually perform the task by a category I call "List" (at home, at office, on phone, etc...). I created a layout using the layout creator function to categorize my To Dos by this "List" field. So as an example I may end up with a list that looks like this: HOME Clean out closet PHONE Call Joe RE: fixing my database. Call Jack RE: birthday party I think you get the idea. "List" also includes the value ON SHELF. I have a script (included below) that omits any record that has O/S in the List field. I do this so as not to have a list that is too long to be useful. When I run the script, however, I lose all the categories in my List Layout. So I may end up with a list that looks like this: Clean out closet Call Joe RE: fixing database Call Jack RE: birthday party Can anyone tell me why I lost my categories and how to get them back in my layout? If you want to see the script I'm using: Go to Layout ["ToDo" (ToDo)] Show All Records Perform Find [Restore] Go to Layout ["ToDo List" (ToDo)] Enter Preview Mode [Pause] Go to Layout ["ToDo" (ToDo)] Enter Browse Mode [] Show All Records Go to Layout [original layout]
comment Posted February 29, 2008 Posted February 29, 2008 I am only guessing here, but you need to sort by category in order to see a sub-summary by Category part in Preview mode. I don't see a Sort Records step in your script.
Akak Posted February 29, 2008 Author Posted February 29, 2008 Thanks for the quick reply...let me try that and see if it works.
Akak Posted February 29, 2008 Author Posted February 29, 2008 IT WORKS!!! Thanks, I've been having this problem with several DBs as I've said. Now I know that I need to sort first.
LaRetta Posted February 29, 2008 Posted February 29, 2008 (edited) Hi Akak, I can also suggest: 1) You don't need to evoke a "Show All Records" right before performing a Find because Finds ALWAYS search all records (unless you are constraining) and 2) You probably don't need to Go To Layout [ "ToDo" ] to perform your find before going to the list view (ToDo List) of the same table to display it. Both layouts are based upon the same table. A find doesn't need to have the field present on a layout to perform a find in them. So that same script could probably be shortened to: Go to Layout [ "ToDo List" (ToDo) ] Perform Find [ Restore ] ... add your sort here Enter Preview Mode [ pause ] ... etc A few less steps and layout switches. Update: Also, after performing a find, you will automatically be in Browse mode so it wouldn't be necessary to evoke it again. LaRetta Edited February 29, 2008 by Guest
Akak Posted February 29, 2008 Author Posted February 29, 2008 Thanks for the tips. It didn't occur to me until after I had already done it that I didn't need to switch layouts that often, but since it worked I figured I wouldn't mess with it. As for the other things with Find functions and Browse modes...I'll have to keep those in mind. Thanks again. :
Recommended Posts
This topic is 6113 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 accountSign in
Already have an account? Sign in here.
Sign In Now