Jump to content

Validation Time!


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

Recommended Posts

Here it is:

I have an auto-enter Time_modified field, auot-enter Time_requested field and an Approval field. When ever a request is modified, the modified time will automatically change. When it changes,

I need it to do this --> when the time_modified field does not equal the time requested field, delete the information in the approval field so that when a search is done for requests not yet approved it shows up in the search. The request will need to be re-approved when a modification is done.

I am using a validation on time_modified.

If(timemodified does not equal timerequested, 1 , approval = "")

Above: the 'does not equal' is actually a symbol from calculation.

Where am I going wrong. Just when I think I am getting good, I get get stumped.

By the way, does anyone know of a GOOD book that goes into depth with calculations and ScriptMaker???

Link to comment
Share on other sites

Need more info. You say it isn't working, but you don't say exactly happens. Are you using the validation formula as the validation calculation for your Time_requested field? You also say that the Time_Requested field is auto-enter. What are you auto-entering into it?

Link to comment
Share on other sites

THanks for responding. I thought I'd never get a response. I am getting desperate.

I'll do my best for more information. I'll try to explain with a scenario...

Sue is the user.

Mike is the request approver.

Sue enters a request. Throughout the day Mike has to approve the requests by entering his intials in the approval field. If during the day, Sue modifies a previous request, the intials in the approval field must be deleted so that the request can be sent back to Mike to re-approve.

What I am trying to do...

Whenever any field in the requests has been modified, the approval field will contain no value.

Again, thanks for responding.

Link to comment
Share on other sites

If I were doing this, I would do it with a script rather than with define fields. There's probably a script that the user runs somehow when they exit the screen, perhaps to return to the list layout or something. In this script, include lines like the following. Add a global time field to record the previous modification time and set it when entering the screen to the time requested

If [ time_requested != gTime ]

Set Field [ Approval, "" ]

End If

It is possible to do this kind of thing without scripts using a technique for noting when specific fields get changed and adapting it to your needs. If you really want to go this route it involves lookups and calculations and can probably be found at www.databasepros.com.

To answer your other question, the best book in my opinion on complex calculations is Scriptology by John Mark Osborne (the same guy who runs www.databasepros.com) and Mark Petrowsky. You can order the book from www.filemakermagazine.com, I think. Another good book is Special Edition Using FileMaker Pro 5.

Chuck

Link to comment
Share on other sites

Thanks for the help Chuck. I will look into the site. I have the Special Edition FM5. It has been very helpful. However I am looking for a book that gets down and dirty with scripts, calculations and validation. I am in the process of ordering Scriptology. Thanks.

Link to comment
Share on other sites

This topic is 8401 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.