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.

Time-limited demo runtime - script help needed

Featured Replies

Hi folks,

 

I'm about to issue a time-limited script for a runtime demo.

 

I need help compiling the script which will be along the lines of;

 

At startup, check if the current date is less than August 30, 2013,

 

if it is, then open the "Home" layout, 

 

else a custom dialogue "Demo period has expired"

 

and the runtime closes.

 

I should add that there is already an "OnLayoutEnter" short script, (I'm assuming this is what the script would be attached to, as it's the start layout). The script reads simply "Set Field [Client Search Global::gSearch; "Enter Search Text"]. I would assume the time-limiting script  lines would be entered above this statement in the same script. Or is there another place I locate this script?

 

I'm not well rehearsed with "If" scripts yet (not a lot of need for them in this, my first, solution).

 

Thanks in advance.

 

 

Solved by doughemi

Go to solution
  • Solution

The script should be triggered by OnFirstWindowOpen (in File->File Options...->Script Triggers)

 

If[Get(CurrentDate) < Date(8; 30; 2013)]

Go to Layout["Home"]

Set Field [Client Search Global::gSearch; "Enter Search Text"]

Else

Show Custom Dialog["Demo period has expired"]

Exit Application

End If

  • Author

That's great. Thankyou.

 

Just needed to get the expressions correct.

 

 

The script should be triggered by OnFirstWindowOpen (in File->File Options...->Script Triggers)

 

If[Get(CurrentDate) < Date(8; 30; 2013)]

Go to Layout["Home"]

Set Field [Client Search Global::gSearch; "Enter Search Text"]

Else

Show Custom Dialog["Demo period has expired"]

Exit Application

End If

Except of course that this process can be easily defeated by any number of mechanisms, including the rather obvious one of tinkering with the computer's clock. Or by interrupting the script.

 

Steven

  • Author

Except of course that this process can be easily defeated by any number of mechanisms, including the rather obvious one of tinkering with the computer's clock. Or by interrupting the script.

Steven

Thanks Steven,

Yes I had thought of that. Fortunately the individuals it will be going to (whom I know personally) aren't that computer savvy to know a workaround like that (trust me, they really aren't!), and I'm still learning about FileMaker security.

Speaking of which, is your book on the topic still available, and relevant to v12? (I noticed its unavailable on Amazon).

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.