Solved

Making a record save

Posted on 2003-10-29
6
339 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
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
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.

 
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

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…
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…
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.
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.

920 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

15 Experts available now in Live!

Get 1:1 Help Now