8 Replies Latest reply on Jun 24, 2009 8:39 AM by anicolais

    Tabbed Modification



      Tabbed Modification



      I have 10 tabs and was wondering if i can connect a seperate auto modification date field to each tab? I tried this already but if anyhting on the record is modified all 10 change to that date. I am triyng to make it so for example when tab 1 is modified that modified date changes and the other tabs mod date remains the same. Does this make sense and is this possible?

        • 1. Re: Tabbed Modification

          If you are using FMP 10, you can set up a script trigger to log your modification date for a group of fields--in your case the group of fields on a tab.


          Write a simple script


          Set Field [table::tabModifcationdateField, get(currentdate)]


          Set the "on Modify" script trigger option on each field on the tab.


          You can either write one script for each tab or with a little creativity, you can write one script and pass a parameter when the script is triggered to identify the specific date field that should have it's modification date updated.

          • 2. Re: Tabbed Modification

            Well you could use GetLayoutObjectAttribute to figure out which layout it is on and use a script trigger or perhaps even an auto-enter to do it. However, this structure does not seem ideal. Why do you need to track each of those fields seperately? What are those fields?


            • 3. Re: Tabbed Modification
                 Is there a way to do this without script triggers? I have filemaker 9 pro so i don't think I have script triggers.
              • 4. Re: Tabbed Modification



                Thank you for your post.


                Yes, your post makes sense, and this can be accomplished, but not in the way you describe.  When you have a field with the option for Modification Date, a change to ANY field will populate the Modification Date.  As you have discovered, this is confirmed when you change any field in the ten tabs.


                If you are using FileMaker Pro 10, you can use Script Triggers.  You can set up EACH of your ten fields to execute a script any time the information is modified.


                First, create a Text field, "Modification Notes", to record all of your modification information.


                Next, create a script, "Modify", with the following information:


                Set Field [ Modification Notes ; Get ( ScriptParameter ) & ": " & Get ( CurrentDate ) & "¶" & Modification Notes ]


                That is, once this script is called, we'll display the Field name (I'll discuss this later) with the date along with the previous notes (listed below on  separate lines).


                Finally, go to Layout Mode, click on the first tab, and select the field you want to capture any modifications.  Pull down the Format menu and select "Set Script Triggers..."   Put a check mark in the option "OnObjectModify", and you will be prompted for a script.  Select the script "Modify", and at the bottom, under "Optional script parameter:", enter the name of this first field and click OK.  Click OK again and return to layout mode.


                Repeat the above paragraph for each of the remaining nine fields, making sure you enter the field name in the Script Parameter.


                The Script Parameter allows you to pass information to the script.  Otherwise, you would need to create ten separate scripts for the ten fields.


                Now, add the "Modification Notes" field to the layout, go to Browse, and change the contents of one of the tab fields.  You will see what field has changed in the "Modification Notes" field.  Do the same with another field, and you will see that field was changed in the "Modification Notes" field, with the previous information on the second line.


                This should get you pointed in the right direction.



                FileMaker, Inc. 

                • 5. Re: Tabbed Modification

                  Like I said, you probably could do this with a bunch of auto-entered date fields.



                  Case ( not IsEmpty ( Field1 ); Get ( CurrentDate ) )

                  Make sure Do not replace existing value in UNCHECKED.



                  Again though, I still think you are going about this the wrong way and you still did not answer my earlier questions.

                  • 6. Re: Tabbed Modification
                       Well it's the same database that i was talking about in the other threads the one with the tabs where it shows the account up above and then it has a tabbed box with 10 differet contacts for that company. I know, not a good way to have made it but it's done for now so thats how it remains at this point. Live and learn. I am getting some good programming experience from it though since the codes are so complex haha.
                    • 7. Re: Tabbed Modification

                      Yes but that is precisely my point. If a month ago when we first suggested to you to fix your structure you had done it, you wouldnt have had all the issues, not to mention all the additional fields. Hopefully you will keep this in mind on your next project. ;)  Proper planning of a system is an imperative step even before you touch a lilne of code.


                      As for your current issue, my previous post should help but now you will need at a minimum of 10 extra date fields to capture it.

                      • 8. Re: Tabbed Modification
                           Sounds good thanks for the help and yeah i know i have been working on this for a long time though so there was really no redoing it even a month ago. Also i didn't really understand relationships then but I am reading up on it as we speak and learning how i can use them. Maybe i'll redo the database again someday when i get some time :smileyhappy: