Solved

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

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 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