2 Replies Latest reply on Jul 10, 2012 10:05 PM by philmodjunk

    How to link a custom dialog box?



      How to link a custom dialog box?




      I'm currently creating a script and need some help. 

      I have createad a dialog box with 2 buttons, yes/no.

      Is it possible when a user clicks yes it will redirect them to another page??


      Please assist. Thanks.

        • 1. Re: How to link a custom dialog box?

          > Reference > Script steps reference > Miscellaneous script steps > Show Custom Dialog

          Show Custom Dialog
          Purpose   Displays a custom message dialog box, with custom text and labels.

          Show Custom Dialog [<title>; <message text>; Table1::input field 1;...]
          Click Specify to display the “Show Custom Dialog” Options dialog box, where you can set the dialog box title, message text, and buttons, and specify up to three fields to use for input or display.
          General options
          Title lets you specify the title of the custom dialog box. You can enter literal text or click Specify to create the dialog box title from a calculation.
          Message lets you specify the message of the dialog box.You can enter literal text or click Specify to create the message text from a calculation.
          Button Labels let you specify how many buttons (up to three) to display in the custom dialog box and labels for these buttons. If you leave a button label blank, the button does not appear in the custom dialog box. If you leave all button titles blank, an OK button displays in the lower-right corner of the custom dialog box.
          Input Field options
          Select Show input field <n> to activate an input field.
          Select Specify to choose the field for input. Each input area maps to one field.
          Select Use password character (*) to mask text as it is entered, or as it is displayed from the database. This option obscures data being input into the custom dialog box or being displayed, but does not alter the actual data as it is stored in the database.
          Use Label to specify a field label (the text that will identify this input to the user.) You can enter literal text or create the label from a calculation.
          This script step is:
          not supported in web publishing
          not supported in a FileMaker Server scheduled script
          The custom message dialog box can take user input for up to three fields in the database, and display data from up to three fields in the database. The script pauses as long as the custom dialog box stays on the screen. Fields used for input can be of type text, number, date, time, timestamp, or container. Your custom dialog box can also have up to three buttons, with custom button titles.
          Use the Get(LastMessageChoice) function to determine which button the user presses.
          1 represents the rightmost button
          2 represents the middle (or second) button
          3 represents the leftmost button
          Button 1, the default or rightmost button, is the only button that will write information from the input fields to a file.
          If values entered into input fields don’t match the field type, a validation error message displays. The user must resolve validation errors before the dialog box can be closed. See Defining field validation for more information.
          The fields you specify don’t need to appear on the current layout. Show Custom Dialog input fields are independent of layouts, similar to the Set Field script step.
          Data can't be inserted into calculation or summary fields.
          As with Set Field script step, Show Custom Dialog will bypass the Allow entry into field field formatting option.
          Data entry via the Show Custom Dialog script step is limited by any access privileges criteria that may be in place. (Select Run script with full access privileges to enable the script for all users.)
          (Windows) You can create a keyboard shortcut for a custom dialog box button by placing an ampersand before the shortcut key letter in the button label. For example, to create a keyboard shortcut ‘D’ (Alt+D) for a button labeled ‘Done’, type the label ‘&Done’.
          Example 1
          The following performs a search using a custom dialog box. The dialog box asks users to enter a customer name and city. The dialog box shows a custom title, custom text, and two input fields.
          #This script begins by entering Find mode.
          Enter Find Mode []
          #The custom dialog box solicits the name and city of the customer to be found.
          Show Custom Dialog ["Find a customer"; "Enter the name and city
          of the customer below:"; Customers::Name; Customers::City]
          #In this example, button 1 is "OK" and button 2 is "Cancel."
          If [Get (LastMessageChoice) = 1]
          #If the user selects button 1, the Find is performed.
          Perform Find [Restore]
          End If
          Exmaple 2
          The following creates a new record and enters data via a custom dialog box. The dialog box asks users to enter a product ID, product description, and product cost. The dialog box shows a custom title, custom text, and three input fields. If the user cancels the dialog box, the record is deleted.
          #In this example, you must create a new record before you can enter data in it.
          New Record/Request
          #The custom dialog box solicits information from the user.
          Show Custom Dialog ["Product information"; "Enter identifying
          information for this product:"; Products::ProductID;
          Products::Product description; Products::Product cost]
          #After the user exits the custom dialog box, the script evaluates
          which button the user has selected.
          #In this example, button 1 is "OK" and button 2 is "Cancel."
          If [Get (LastMessageChoice) = 2]
          #If the user cancels the script, the record created at the beginning of the script is deleted.
          Delete Record/Request [No dialog]
          End If

          Creating Modal Dialogs in Filemaker Pro®

          Dialog Fun in FileMaker Video

          • 2. Re: How to link a custom dialog box?

            Assuming Button 1 is labeled "Yes",

            Show Custom dialog [ "Go to Layout for data entry?"]
            If [ Get ( LastMessageChoice ) = 1 // "Yes" was clicked]
               Go to Layout [Data Entry]
            End If