Solved

How do I prevent a line item from being edited after it is entered?

Posted on 2013-06-02
5
316 Views
Last Modified: 2013-06-16
I have a master-detail form ( a sales form with sales line items ).  After a user completes a line item, I want to prevent that user from editing it.  They can go ahead and click on the delete button and re-enter if they have to.  I am creating an audit trail for the sales form.  I modded the delete button script to insert a record to the audit database when clicked, but I want to "lock" the fields from being modified after the line item is completed.  This is using FM 6, so we are going pretty far back.

Thanks!
0
Comment
Question by:ITMikeK
  • 3
  • 2
5 Comments
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 39216918
There are a number of ways to do this in FM 7 and later using script triggers. In FM 6, while you can use a validation calculation, the simplest way to go about it is to make the field a button that runs a script. When the user clicks on the field to enter something, the script runs and checks to see if the field already has a value in it. If it does, it denies entry (Exit Record). If the field is empty, it uses the Go To Field script step to put the user into the field.

I would turn off field access entirely for any of your Sale Line Items so that the user must click on it to enter.

There are other methods using field validations and it's even possible to run scripts similar to an FM7+ script trigger by using the old free ZippScript plugin (or the similar DoScript plugin) and specifying the script by name in the validation calculation. However, running a script on validation means that the user has already entered the field and possibly edited, something you can use a Revert to correct but it might Revert other things at the same time....

http://www.filemakermagazine.com/plugins/zippscript.html
0
 

Author Comment

by:ITMikeK
ID: 39230996
Checking this solution out now.  Will let you know in 24 hours.
0
 

Author Comment

by:ITMikeK
ID: 39239630
I've requested that this question be closed as follows:

Accepted answer: 0 points for ITMikeK's comment #a39230996

for the following reason:

Thanks!
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 39239631
A solution was provided that was apparently successful but was not accepted....
0
 

Author Closing Comment

by:ITMikeK
ID: 39239995
I don't know why it said 0 points.  It was supposed to be 500 points.  Solution provided!  Sorry about any confusion.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question