July 25, 200817 yr I have created a field which I set up as a button to run a script. Basically when the user select the field the script pops up with a window that asks them if they intend to change the date. If the user select yes, certain data from the record is copied to a separate table because changing this particular field changes dates for several other fields via calculations. The field they originally click on is then blanked out and they can enter a new date. If they select "no" when they click in the original field then nothing happens. The Question: How do I keep this script from running when the user is in Find Mode? Is there a way to say "if user is in Browse Mode and this button is clicked...run the script". That way it wound not throw up the question about wanting to change the date if they are just trying to do a find.
July 25, 200817 yr Hi Dana, The Question: How do I keep this script from running when the user is in Find Mode? Is there a way to say "if user is in Browse Mode and this button is clicked...run the script". I think you need "Get(WindowMode)". From Help of FileMaker: Returns a number representing the mode FileMaker Pro is in at the time the function is evaluated: 0 for Browse mode 1 for Find mode 2 for Preview mode 3 if printing is in progress Hope that helps...
July 25, 200817 yr Author Works great! Wow that seemed way to easy...thanks for the info. I have never used that function before.
July 25, 200817 yr Author I have another problem now. I only need 3 people to be able to run the script. If I change everyone else to "View Only" in the Script Privileges then they can't access the field in find mode - which they need to be able to do. If I set them to "Executable" in the Script Privileges then they can click and run the script in Browese mode - which I don't want them to be able to do. Do I have to create another field for use in find mode only?
Create an account or sign in to comment