Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Making a record save

Posted on 2003-10-29
6
Medium Priority
?
345 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 750 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

618 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