7 Replies Latest reply on Aug 31, 2012 1:45 PM by comment

    Duplicate Record/Request not duplicating all fields?

    bearthedog

      I'm using a script with the Duplicate Record/Request,

      however certain fields do not populate with the same info.

      If I have AutoEnter Data on the fields (which is what I want

      due to size limitations in iPhone app I have no room for field headings)

      it DOES NOT work, however if I uncheck that option it does.

      It will populate with my default AutoEnter data though.

      What gives? Is there a way around this?

       

      FYI: On Mac OS X 10.6.8 Filemaker Pro 11 Advanced using FilemakerGo 11

      will convert to Filemaker Go 12 when I update

       

      Thanks

        • 1. Re: Duplicate Record/Request not duplicating all fields?
          tech_liaison

          I think the problem is that Duplicate Record, by its very nature, duplicates a record and all the data in that record; so you normally wouldn't want auto enter to work on a duplicated record or you might lose data. Auto enter is really only geared to work on New Record.

           

          What I usually do for the situation you describe (and also to display help text within a field that may perform a script when you click it), is to the make the field transparent, and then add a text object behind the field. I then apply conditional formatting to the text object so that when data is entered in the field, the text object changes to the same color as the background, effectively becoming invisible. It's a little more work than what you're trying to do, but it certainly works in all situations where the target field is empty. HTH.

           

          Best,

          Dave

          • 2. Re: Duplicate Record/Request not duplicating all fields?
            tduell

            If you duplicate records and the field needs to use auto enter don't use the Data auto enter feature as that will overwrite your content with the text from the Data option. Instead, use the Calculated value (Check the box for Do not replace existing value of field) and use the following formula that is universal to any auto enter calculation. Make sure to substitute "Auto entered text" with what you want to use - including "" if you want it to be empty. Then when you duplicate the record it will auto enter your calculted value if the field is empty or it will actually duplicate the existing value using the Self function.

             

            If(

            IsEmpty(Self);

            "Auto entered text";

            Self

            )

             

            For more tips like this, be sure to visit our free FileMaker section at www.formulationspro.com

             

            Todd Duell

            FileMaker 11 Certified

            www.formulationspro.com

            • 3. Re: Duplicate Record/Request not duplicating all fields?
              bearthedog

              Dave, Thank you that sounds great, however could you be more specific on the details?

              I don't know how to trigger the conditional formatting.  Could you show me the

              calculation?  By the way the field is a drop down field so the user selects what

              they want.  Which may create a problem.

              • 4. Re: Duplicate Record/Request not duplicating all fields?
                bearthedog

                Todd,

                Your calc works! *However

                To clarify:

                Using your calc on a pull down list field

                *Do not replace existing value of field (if any) is NOT checked!

                Works with my script (which also clears some fields)

                Works with Filemaker Pro 11 and Filemaker Go 11 buttons,

                but of course does not clear those fields.

                Thanks for the help

                BEAR

                • 5. Re: Duplicate Record/Request not duplicating all fields?
                  tduell

                  If you want it to clear the fields, use this calc:

                   

                  If(

                  IsEmpty(Self);

                  "";

                  Self

                  )

                  • 6. Re: Duplicate Record/Request not duplicating all fields?
                    comment

                    tduell wrote:

                     

                    If(

                    IsEmpty(Self);

                    "";

                    Self

                    )

                     

                    Isn't this a very elaborate way to write Self ?

                    • 7. Re: Duplicate Record/Request not duplicating all fields?
                      comment

                      BTW, I wanted to second Dave's advice to use conditionally formatted text (typed directly onto the layout). Entering bogus data into fields is generally not a good idea - esp. if the field needs to be validated.