5 Replies Latest reply on Jul 23, 2013 11:22 PM by MSNThomas

    Auto-enter in fields from external files




      I am working in Filemaker 9.


      I have a contact database file where I auto-format the first and last name fields with the following auto-entry calculation:


      TextFormatRemove(Proper( Substitute(TrimAll ( Self ; 1; 2 );¶;"")))


      The do not replace existing value checkbox is not checked


      It works fine when I am working within the file.


      However, I used the contact table from this file in another fm database, and when entering information from that file the autoformat does not work.


      Do auto-enter options not trigger when entering data through another file in filemaker 9?



      Any help would be much appreciated,


      Thank you.

        • 1. Re: Auto-enter in fields from external files

          Well, first off if there is any way you can upgrade to FileMaker 12, please do.  There are so many more features you can take advantage of. 


          Unfortunately, I can't even run FM9 in OSX Mountain Lion. 


          I was however able to get your formatting calc to work in FileMaker 12 in a solution where the data file is separate from the user interface.


          I would check to make sure your file reference is correct between the files.


          It is also possible that this behavior changed some time between version 9 and 12.


          Darren Burgess


          • 2. Re: Auto-enter in fields from external files

            Thanks Maestro.


            It would also be nice to work in advanced. There is discussion in my office about upgrading, but I don't know when or if that might move forward. The section that controls equipment and budgeting is allergic to computers.


            The data is saved in the data file, it just isn't formatted.  That just seems... odd.


            I think I will try making a table of global fields in the UI file to serve as a buffer to store the information until the user hits a save button, and then use a script to create a new record or edit data in the data file. I can then just add the auto formatting to the global field. 


            This should also reduce the number of blank records I end up with from users closing out of the pop-up window when they decide they don't want to enter a new contact after all, and they don't use the cancel button I put in which cleans that up.

            • 3. Re: Auto-enter in fields from external files

              This table of global fields is way of doing your record edits and commits transactionally, correct?  I think that is your intent. 


              I just implemented the scripts found here:



              Really good stuff.  User has to click a save button to save edits, and everything, including record edits and changes is portals is committed on save, or reverted if desired.


              Darren Burgess


              • 4. Re: Auto-enter in fields from external files

                I would recommend one small change in that script you referenced, Darren.  Where it isolates the record?  There is possibility that another User creates a new record in that moment that you have the current record omitted.  So when you then 'show Omitted, it can appear in your found set.  The way to avoid it is instead of:


                Go to Layout [ “Class Selector” (Faculty Staff) ]

                Show All Records

                Omit Record

                Show Omitted Only


                ...add this right to the end of the above portion:



                Exit Loop If [ Get ( FoundCount ) = 1 ]

                Go To Record/Request/Page [ Last ]

                Omit Record

                End Loop


                If there is a new User record which has appeared in the set, it will be the last record so you want to omit it.  Technique learned from JT (aka -Queue) back in approx 2006.


                JMO ( John Mark Osborne ) also had a concept which performed a find for that specific record to isolate it.  Either way, protect from multi-user with one or other of these techniques to be sure you don't end up with more than you bargained for. 

                • 5. Re: Auto-enter in fields from external files

                  Ahh, but no script triggers in Filemaker 9! 

                  As my wife would say, \(>o<)/