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.

FMP v8 Scripts running in FMS 5

Featured Replies

We recently placed one of the files we're working on, onto FMS 5, and the scripts don't seem to be working appropriately, 2 of them specifically. These are meant to be accessed online via the Instant Web Publishing interface. In general these scripts retrieve files by pausing, allowing for data entry into a field and then clicking a button to resume the script. For some reason, the scripts seem to stop after they pause. Any ideas?

Whenever we serve up the file via FMP 8 advanced via the IWP the scripts work perfectly fine, so I am convinced that all the steps are web-compatible. Are there certain script steps or actions we need to be aware of that behave differently when the file is served up on FMS?

Thanks!

P.S. Error capture is set to ON, if that makes a difference

P.P.S Here's the startup script:

If [ Get ( AccountName )= "mseacct" ]

Else

Set Error Capture [ On ]

Show/Hide Status Area[ Lock; Hide ]

Go to Layout [ “ONLINE - Apllication Welcome” (Applicants) ]

Enter Find Mode [ ] [ Pause ]

Set Variable [ $StudentID; Value:Applicants::BYU ID# ]

Perform Find [ ]

If [ Get ( LastError ) = 401 ]

New Record/Request

Go to Layout [ “ONLINE - Personal Information” (Applicants) ]

Set Field [ Applicants::BYU ID#; $StudentID ]

Else

Go to Layout [ “ONLINE - Personal Information” (Applicants) ]

End If

End If

Are there certain script steps or actions we need to be aware of that behave differently when the file is served up on FMS?

Yes, and the script you provided seems to be malformed. Check your If/IfElse construct. Also youmay not be able to have something in find mode paused while users enter data. They may need to enter first into a global field and then do a find.

Did you really mean FileMaker Server 5?

Steven

Should be:

If [ Get ( AccountName )<> "mseacct" ]

..Set Error Capture [ On ]

..Show/Hide Status Area[ Lock; Hide ]

..Go to Layout [ “ONLINE - Apllication Welcome” (Applicants) ]

..Enter Find Mode [ ]

..Set Variable [ $StudentID; Value:Applicants::BYU ID# ]

..Perform Find [ ]

..If [ Get ( LastError ) = 401 ]

....New Record/Request

....Go to Layout [ “ONLINE - Personal Information” (Applicants) ]

....Set Field [ Applicants::BYU ID#; $StudentID ]

..Else

....Go to Layout [ “ONLINE - Personal Information” (Applicants) ]

..End If

End If

Just a note related to error checking. A test for Get(FoundCount)=0 is a better test than Error 401.

Steven

True, i was just copying the code sorry

  • 2 weeks later...
  • Author

Just an update for those that have helped out. I had the IT guys upgrade FM Server to Version 8, and the script began working as desired. Thanks for your help, I think I will clean my script up while I'm at it! Thanks!

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.