Solved

Making a record save

Posted on 2003-10-29
6
343 Views
Last Modified: 2010-04-27
I got a question. I work with Filemaker for 3 years now. I have become pretty good, but as always, thinks can be better. I have a problem/question. I work with a database called "intakeform". I made it possible to have different versions of a record. For example: you have "intakeform" with number 1.1. When you make a new version, there comes a record with the number 1.2. Is it possible to make the 1.1 record only readable. So that people can only read the record and not adjust the record? Thanx a lot, and if you need some more explanation, let me know.
0
Comment
Question by:Ducolo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:Mariano_Peterson
ID: 9645626
Your table will have to have a primary key field (keyp), and a foreign key (keyf_nextVersion).  keyf_nextVersion will hold the primary key of the record that represents the next version.  When you create a new version, you'll have to be sure to properly set keyf_nextVersion so that it points to the new version you just created.

You'll also need a self-relationship:
Relationship Name: Self.NextVersion
Relationship Files: test.fp5 :: test.fp5
Relationship Keys: keyf_nextVersion :: keyP

Then go to File > Access Privileges > Passwords, and set up a password where "Edit Records: " is set to "Limited...".  In the limited calcculation, enter "not isvalid( Self.NextVersion::keyP )".

The validation will only work for people that login with that password.  Now, users won't be able to edit the old versions.
0
 
LVL 3

Accepted Solution

by:
D0N earned 250 total points
ID: 9700999
Another mechanism is to simply have a variable called unlock_rcd which you only set true when the record ID matches your newest record.   Once that's done, you can use 'validated by calculation' (to see if unlock_rcd is true) and (together with 'Strict: Do not allow users to override validation') you can protect those fields you don't want altered.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 9723696
If you store the version number in a field, you can create an Edit script which would check first whether the version number is the max(version number). If not, edition is refused and you can offer to edit the most recent version of same record type for instance.
That requires the version field to be numeric, no alpha
Alternative: when you create a new version, you flag the old ones as " read only" using a field which is verified by the editing script. Don't really like this one, very slow if you have a lot of records.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Mariano_Peterson
ID: 9727778
I've put together a very quick demo that illustrates my idea above.  You can dowload it here: http://mariano.petersonpages.com/demo/fmp/recordVersion.zip

Note that the master password is "master", and the limited password is "limited".  The default password is "limited", which prevents you from editing records that have a newer version.

-Mariano
0
 

Author Comment

by:Ducolo
ID: 9730695
> Then go to File > Access Privileges > Passwords, and set up a    > password where "Edit Records: " is set to "Limited...".  In the       > limited calcculation, enter "not isvalid( Self.NextVersion::keyP )"

I cannot get to the point of the: '...set to "Limited...". In the limited calcculation, enter "not isvalid( Self.NextVersion::keyP )'. How do I do this????
0
 
LVL 3

Expert Comment

by:Mariano_Peterson
ID: 9744198
What version of FileMaker are you using?  I think the "Limited" feature was introduced in v5.5 or maybe v6.0.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 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