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.

Show alert/message when a specific file is opened

Featured Replies

The problem.  

I have a DB with passwords.  When one particular file is opened in the DB, lets call it file X, the user needs to do a specific action.  This action is unique to this file X.  If this gets forgotten at times (and it is) it creates problems.  

 

Solution I am looking for.

To have some kind of notification or pop-up appear to alert the user.  Or have a sticky type note that obscures part of the record and can be moved out of the way, but is there again when opened next time.  Or anything else that would help forgetful users to be cleverer. 

 

 

Edited by ChangeAgent

  • Author

Yes I do know you can run a script.  However not sure how to implement.  

 

Let me explain differently.  I have one reticular record in my DB.  I called it file X before.  When anybody opens this file X, and only this one reticular record X, I want to get some kind of alert. 

 

Clear?

 

It really is not clear what you want to have done.  This sentence is not clear at all:

"I have one reticular record in my DB.  I called it file X before"

 

As comment mentions you can use the OnFirstWindowOpen event to run any script you want.  Do you know that but you don't know how to write the script?

From your original post "When one particular file is opened in the DB" --> you may be using the word "file" in your context but it really means a record in the database? So perhaps you want to show the user a notification when they go to that record?  That would be an OnRecordLoad event.

 

  • Author

Thanks Wim,

It really is not clear what you want to have done.  This sentence is not clear at all:

"I have one reticular record in my DB.  I called it file X before"

As comment mentions you can use the OnFirstWindowOpen event to run any script you want.  Do you know that but you don't know how to write the script?

 

​I looked at that but not sure how to use it.

 

It really is not clear what you want to have done.  This sentence is not clear at all:

"I have one reticular record in my DB.  I called it file X before"

 

Sorry typo 'reticular' should read particular.  I noted just now that it is the spell-check that changes it if I mistype the word. 

And indeed record is what I mean with 'file'.  Sorry not that familiar with all the terms.  

 

So in a way I am not sure how to proceed.

 

The challenge I have is indeed to have a note or alert opening when 'Record X' is opened and only for that particular record.  And the second challenge that i am not that good in programming FMP.  I also have always had a hard time understanding the manual in FMP, in some way the way they explain eludes me.  And that could be my lack of skill in that area.  I did follow the link posted by comment, but it did not  help me any further in a real way.

The challenge I have is indeed to have a note or alert opening when 'Record X' is opened and only for that particular record.

​1. Write a script that does whatever you want to have done when that particular record is loaded, e.g.

If [ someConditionThatIdentifiesRecordXIsTrue // e.g. Department::name = "Marketing" ]
  Show Custom Dialog [ "Alert" ; "Record X!" ]
End If

2. Go to Layout mode, choose Layouts > Layout Setup > Script Triggers, check the OnRecordLoad trigger and select your script.

Edited by eos

  • Author

Thanks eos,

 

mail landed in spam hence delay.  After an hour trying I still do not get it to work.

Edited by ChangeAgent

It would be helpful if you told us what you've tried, and how it does not work.

  • Author

I just figured it out, I was pasting rather than use the scripts workspace.  That caused the errors.  Now got it to work by connection a script to a button to copy the password.  Thanks everybody. 

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.