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.

Do a Find when user switches to the layout

Featured Replies

I have a layout that I want to run a script that will do a find and only return certain records when it is switched too by choosing in the Layout dropdown. I tried using OnRecordLoad but that created a loop I couldn't break out of. My script was.

Set Error Capture[On]

Enter Find Mode[]

Preform Find [Restore]

If[Get(LastError) = 401]

 Exit Script []

End If

Set Error Capture[Off]

 

What I am struggling with is that there will be times that it will return zero records and then my plan was to add a script step to add a new record if that happens but haven't got that far yet.

 

 

Thanks

Thom

 

 

Solved by bcooney

Go to solution
  • Solution

Try OnLayoutLoad. Hmm. I'd throw a dialog to ask if they want to add a new record.

 

If (get(foundcount)=0

 Show Dialog, "Add New?", "Yes", "No"

  If get(lastmessagechoice) = 1

 Perform Script "Add New"

 Else

 go to original layout

endif

  • Author

Where is OnLayoutLoad? I see OnLayoutKeystroke, OnLayoutEnter, OnLayoutExit?

 

Thanks

Thom

  • Author

oops... Should have done a little googling.... Your answer fixed it. Thanks a ton

 

 

from Filemakers website

NOTE: The name of OnLayoutLoad has been changed to OnLayoutEnter in FileMaker Pro 11 to match the OnLayoutExit trigger that has been added.

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.