Jump 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.

Displaying AppleScript Messages?

Featured Replies

In version 4 of filemaker you could display a message via AS that would show a field value and a button choice, is that possible with 5 and how is it done.

Cheers

Coops

[This message has been edited by Coops (edited January 09, 2001).]

There shouldn't be any difference between how you do it in FMP4 and how you do it in FMP5. Did you have an AppleScript that broke when you upgraded the file to FMP5?

display dialog "Which name?" with buttons { (cell "First_Name" of current record of layout 0 of database "Names.fp5"), (cell "Last_Name" of current record of layout 0 of database "Names.fp5") } default button 1 with icon 2

Chuck

[This message has been edited by Chuck (edited January 09, 2001).]

  • Author

Thanx Chuck, It sort of helps as I know diddly squit about AS.

I had an inherited file that worked in 4 but not in 5 all it displayed was ^0 in the message box, as I no longer have that file I can't give you more info, Sorry.

What I want to do is display a dialog with a field value in the message choice from a database called dictionary, I then want to display two button choices and then get filemaker to respond in two different ways depending on button choice, Possible?, can u help?

Appreciated

Coops

[This message has been edited by Coops (edited January 10, 2001).]

[This message has been edited by Coops (edited January 10, 2001).]

Coops,

Here's how you would construct the AppleScript.

display dialog ("Your dialog message here " & cell "Field_Name" of current record of layout 0 of database "dictionary") buttons {"Choice1", "Choice2"} default button 1 with icon 1

set (cell "gDialog_Button" of current record of layout 0 of database "dictionary.fp5") to button returned of result

This AppleScript does two things. First is shows a dialog box that has as its message "Your dialog message here <field contents>" where <field contents> is the contents of the field Field_Name in the database dictionary and in the current record. Make sure that the database name is exactly what it is called. For instance, if there's a .fp5 extension after the word dictionary in the file name, make sure that the script refers to the file this way. The dialog box then shows two buttons, "Choice1" and "Choice2" with the default button being "Choice2" (chosen if the enter key is pressed and shows up with a thick border in the dialog box.

The second line takes the button selected and places that value (either "Choice1" or "Choice2") into a global text field (which you'll need to create in FileMaker).

Here's how you use this AppleScript in FileMaker. Create a new FileMaker script and use the following steps:

Perform AppleScript [ <enter the script above> ]

If [ gDialog_Button = "Choice1" ]

  • Author

Thanx Chuck, That hit the mark spot on

you're a 24 Carat diamond geeza!!

Regards

Coops

Create an account or sign in to comment

Important Information

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

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.