2 Replies Latest reply on Apr 29, 2016 3:00 AM by sherab4

    To open a custom dialog box instead of a default FileMaker one

    sherab4

      I have two files, when I select a button it takes me to a related record from the record on the file i just left. Trouble is a default dialog box appears "No records match this find criteria". I want it to say that plus Click on Continue then select New Record. How do I suppress the default dialog box.

      I don't want it to automatically create a new record, there needs to be an option to opt out.

        • 1. Re: To open a custom dialog box instead of a default FileMaker one
          erolst

          sherab4 wrote:

          How do I suppress the default dialog box.

          Use

           

          Set Error Capture [ on ]

           

          then do your own error trapping/handling, using (mainly, not not limited to) steps and functions for flow control like If/Else/ElseIf, Get ( LastError ), Show Custom Dialog and Get ( LastMessageChoice ).

           

          Of course, you could also check first if a related record exists, before attempting a GtRR.

           

          If [ IsEmpty ( RelatedTO::primaryKey ) ]

            Show Custom Dialog [ "No related record. Create one?" ]

            # [ 1: Yes, 2: NO ]

            If [ Get ( LastMessageChoice ) = 2 ]

              Exit Script

            End If

            # [ code to create a new related record goes here … ]

          End If

          Go to Related Record [ From: RelatedTO ; … ]

           

          sherab4 wrote:

          I want it to say that plus Click on Continue then select New Record.

          ?

          1 of 1 people found this helpful
          • 2. Re: To open a custom dialog box instead of a default FileMaker one
            sherab4

            AWESOME - Thank you so much. Took me a little while to figure out the If's, Else etc but it works beautifully.