Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dialogs with fields for Windows

Featured Replies

We have our dialog functions in MBS FileMaker Plugin to quickly show a dialog in a calculation. Usually to show a custom dialog in FileMaker at any time to quickly report something to the user or to quickly ask a question with yes or no.

 

For example we can just ask with a Let statement for whether we should delete a file:

 

Let ( 

[

    _ = MBS("Dialog.Reset") ;

    _ = MBS("Dialog.SetDefaultButton" ; "Yes") ;

    _ = MBS("Dialog.SetOtherButton" ; "No") ;

    _ = MBS("Dialog.SetAlternateButton" ; "Cancel") ;

    _ = MBS("Dialog.SetMessage" ; "Delete the old file?") ;

    _ = MBS("Dialog.SetWindowTitle" ; "Backups done") ;

    _ = MBS("Dialog.Run") ;

    button = MBS("Dialog.GetButtonPressed")

] ;

    // 0 -> Yes, 1 -> No, 2 -> Cancel

    button

)

A few years ago we added a few helper functions for macOS to add some text fields to ask a question and get some data. For example we may ask:

  • The new file name for renaming a file

  • Ask for user name and password for new account

  • Ask user for an email, phone number or some other quick value

  • Ask for some initial values to create a new record.

  • Enter a approval code like TOTP

If someone needs to pick something from a list, you better use ListDialog functions.

 

For the fields, let's make a little script to ask the user for an user name and password with two fields:

 

Set Variable [ $r ; Value: MBS( "Dialog.Reset" ) ]

Set Variable [ $r ; Value: MBS( "Dialog.SetAlternateButton" ; "Cancel" ) ]

Set Variable [ $r ; Value: MBS( "Dialog.SetDefaultButton" ; "Create" ) ]

Set Variable [ $r ; Value: MBS( "Dialog.SetInformativeText" ; "To quickly add an user name and optional a password. If no password is provided, we generate one." ) ]

Set Variable [ $r ; Value: MBS( "Dialog.SetMessage" ; "Create new user account for My Solution" ) ]

Set Variable [ $r ; Value: MBS( "Dialog.AddField"; "Account name:"; ""; "Name" ) ]

Set Variable [ $r ; Value: MBS( "Dialog.AddField"; "Initial password:"; ""; "Password" ) ]

Set Variable [ $r ; Value: MBS( "Dialog.SetWindowTitle" ; "Create Account" ) ]

Set Variable [ $result ; Value: MBS( "Dialog.Run" ) ]

Set Variable [ $name ; Value: MBS( "Dialog.GetFieldText"; 0) ]

Set Variable [ $pass ; Value: MBS( "Dialog.GetFieldText"; 1) ]

Show Custom Dialog [ $result & ¶ & $name & ¶ & $pass ]

WindowsFieldDialog.png

Or as Let statement:

 

Let(

[

r = MBS( "Dialog.Reset" ) ;

r = MBS( "Dialog.SetAlternateButton" ; "Cancel" ) ;

r = MBS( "Dialog.SetDefaultButton" ; "Create" ) ;

r = MBS(

"Dialog.SetInformativeText" ;

"To quickly add an user name and optional a password. If no password is provided, we generate one."

) ;

r = MBS( "Dialog.SetMessage" ;

"Create new user account for My Solution" ) ;

r = MBS( "Dialog.AddField" ;

"Account name:" ;

"" ; 

          "Name" ) ;

r = MBS( "Dialog.AddField" ;

"Initial password:" ;

"" ;

"Password" ) ;

r = MBS( "Dialog.SetWindowTitle" ;

"Create Account" ) ;

$result = MBS( "Dialog.Run" ) ;

$name = MBS( "Dialog.GetFieldText" ; 0 ) ;

$pass = MBS( "Dialog.GetFieldText" ; 1 )

] ;

$result

)

 

As you see we can just evaluate a Let to get the variables filled. This is very convenient to show a dialog at the spot in some calculation. 

If you need more, check out the example on how to make a dialog from a FileMaker layout and put many more controls on the dialog.


Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.