I was able to achieve something similar, except mine locked after 10 minutes. I entered the
the File>Manage>Accounts & Privileges window.
Created a privilege set
Edited the privilege set so that under the “records” drop down menu it reads “custom privileges”.
By selecting that option, another widow pops up where I authorized:
When I selected “Limited” under the Edit field, it opened the calculation window where I created a calculation based on the Account Name and Time Stamp. (I authorized the creator of the record to edit the fields within ten minutes of record creation....or at least that was my intent).
z_Created by = Get ( AccountName ) and
z_Created timestamp ≥ (Get ( CurrentTimeStamp )-10)
This is as far as I can help. Sorry I can’t explain the Time Stamp calculation as I don’t understand it too in depth and I am a very new to scripts and FMP.
Hope this points you in the right direction.
Just wanted to see if I could help someone else instead of always asking for help.
That's much like I do it. But since Timestamps are per second, shouldn't that be 10*60 for minutes? For 24 hours it would be 24*60*60 (there are 3600 seconds in an hour), or just use 86,400 (number of seconds in a day).
It is best to use Get (CurrentHostTimeStamp). Otherwise someone could temporarily change the date/time on their own computer, and get past the test. The above works whether the file is actually "hosted" or not.
P.S. You need to keep the above in mind, especially when doing Finds, if you're in a different time zone than the physical files, especially if over the date line.
As the developer you would NOT have any such Edit restrictions on your Privilege Set (likely Full Access).
Thank you both Sulu and Fenton for the response, sorry I have not responded sooner. I have been very busy this week. I will let you know how it goes this weekend..
Sulu and Fenton,
Worked well for my project. I hade to make a couple minor changes to suit my needs. Thank you for you help!!