Solved

Making a record save

Posted on 2003-10-29
6
338 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
File Maker Pro Adv: Bypass browse mode on open 7 599
Mysql ODBC Drivers for Mac 2 919
Primary 1 67
Filemaker import xml 3 157
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

19 Experts available now in Live!

Get 1:1 Help Now