Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

19 Experts available now in Live!

Get 1:1 Help Now