Jump to content

Show alert/message when a specific file is opened


This topic is 3250 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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
Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This topic is 3250 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.