Jump to content

This topic is 8964 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I want to have a field in a layout display the date of entry into other fields and then have it never change again so the record of entry can't be confused with others (it is a reciept of payment). I am using the 'date of modification function' for this at the moment, is this the best way to do this? Is there a way to have it not change after the original entry was made? Or a way that all of the fields in this particular record can't be modified after initial entry? How do I accomplish this? Thanks...

Posted

quote:

Originally posted by richshone:

I want to have a field in a layout display the date of entry into other fields and then have it never change again so the record of entry can't be confused with others (it is a reciept of payment). I am using the 'date of modification function' for this at the moment, is this the best way to do this? Is there a way to have it not change after the original entry was made? Or a way that all of the fields in this particular record can't be modified after initial entry? How do I accomplish this? Thanks...

You need to use some scripting to change these various attributes (such as date of payment) and use a script step to set the date.

The Date of Modification changes each time the record is modified, for any reason.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

quote:

Originally posted by richshone:

Thanks for the advice, your idea worked fine, but can you tell me if I can script a prompt to have the date etc. unchangeable after printing to avoid accidental modification after the fact? Thanks...

I do the following: Add a "Date Printed" fiel, which is set by your printing script ONLY if it is currently empty. Then edit your date modification script to modify the date ONLY if the Printed Date is empty.

The Printed Date remains in the background and is really just for error checking, but you sometimes put it to use for reporting purposes.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

Thanks for the advice, your idea worked fine, but can you tell me if I can script a prompt to have the date etc. unchangeable after printing to avoid accidental modification after the fact? Thanks...

Posted

Rich,

As I can see you want 2 things:

1. Have a field with the date of creation of the record.

2. After the initial entry, lock all the fields in the layout.

Answ:

1. To create a new record run a script:

New Record/Request

Set Field[dateOfCreation,"status(CurrentDate)"]

Go to Layout

2. Create two layouts: "Entry" and "Browse".

In the "Browse" layout: un-check the "Allow entry into field" option.

In the "Entry" layout you have that option checked in all fields except in the field "dateOfCreation".

Define a "Ok" button (Go to layout ["Browse"]).

Be sure this layout is not included in the layouts menu.

* You can also create a "Modify" button in the Browse layout to perform a script that checks the password the user has (see status functions) and with an if statement determine if he/she is allowed to modificate the record or not (allow the administrator to modify the records in case of an error).

Hope it

This topic is 8964 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.