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
Solved

Making a record save

Posted on 2003-10-29
6
341 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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