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.

Featured Replies

We used to suggest scripts like the one below to install the MBS FileMaker Plugin and check for the error status. But the following script has a big problem, a little oversight on how FileMaker works. Try to guess what is wrong here:

Install Plug-In File [ Install Plugin Update if needed::Plugin File Mac ] 
Set Variable [ $LastError ; Value: Get(LastError) ] 
Set Variable [ $LastErrorDetail ; Value: Get(LastErrorDetail) ] 


The script installs the plugin and in case of an error, we like to query the error code and message. But this script never gets the last error detail! You may guess that we query the last error number and detail for the first line with the installation. But what we do is to query the detail for LastErrorDetail, we get the result from the Set Variable script line in the second line. Yes, the Set Variable will clear the error state and thus we never get the detail for the first line.

We have a fixed script:

Install Plug-In File [ Install Plugin Update if needed::Plugin File Mac ] 
Set Variable [ $r ; Value: Let([
  $lastError = Get(LastError);
  $lastErrorMessage = Get(LastErrorDetail)
]; 1) ]


This time we use a Let() statement to query both LastError and LastErrorDetail and assign it to variables. This way the Set Variable can overwrite the error state after we got the values.

If you have existing scripts using Get(LastErrorDetail), you may want to update them to use a Let statement.

Solved by comment

Go to solution
  • Solution
5 hours ago, MonkeybreadSoftware said:

the Set Variable will clear the error state

That is a valuable observation.

I would make a small change to your calculation, though:

Let ([
$lastError = Get(LastError) ;
$lastErrorMessage = Get(LastErrorDetail)
]; 
""
) 

This way the dummy variable ($r in your example) is never created and does not occupy any memory space.


Or just eliminate the dummy variable altogether and do:

Set Variable [ $lastError ; Value: Let ( $lastErrorMessage = Get(LastErrorDetail); Get(LastError) ) ]

 

Edited by comment

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.