Solved

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

Posted on 2013-06-02
5
306 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 24

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 24

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now