Re: FM scriptmaker and perform applescript step, set access property
Re: FM scriptmaker and perform applescript step, set access property
- Subject: Re: FM scriptmaker and perform applescript step, set access property
- From: webguide <email@hidden>
- Date: Sat, 27 Jan 2001 09:04:10 +1300
G'day Janis,
>
I am trying to lock a field so it can't be
>
modified.
>
Question 1: What is the correct syntax to set the property for field to no
>
access?
you're trying to do this the hard way. This is very easy to perform in
FMP and can be called from an AS if necessary.
Set up a 'Lock' field which is essentially boolean - locked or unlocked.
Whichever field you want to lock should have (strict) validation set by
calc, based on the value of the lock field. eg. If(Lock data field =
"Locked",0, 1)
If the field is flagged as locked, the validation kicks in and the user
gets a message "Field is locked" or whatever. Write a Scriptmaker
script to set the 'Lock' field to its locked value and call this from AS
if need be.
We have our lock fields on a (hidden) Admin layout as a checkbox so they
can be 'unlocked' by the administrator if absolutely necessary.
We use a looping script to lock all records for a week after a payroll
file has been sent to the bank (so the db and bank statements will always
reconcile)
>
Question 2: Is it possible within the perform applescript step to set
>
more than
>
one field?
if you mean multiple cells in the one record in one step, yes.
set {cell "mycell1", cell "mycell2"} to {"mydata1", "mydata2} and so on
or simply
set cell "Mycell" to "mydata"
set cell "Mycell2" to "mydata2" etc
cheers
k