Jump to content

HELP...IM GOING MAD!!!! SCRIPT


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

Recommended Posts

Hi All

 

I am hoping some one can help!

I have a table called TPM, in that table is a field "Next Due Date" Which is auto generated by creating a new record. You input the date you did the service and then it adds 3 months to that date and that appears in the Next Due Date Field.. All working...

 

What I am trying to do is when the database loads it runs a script to see if there are any outstanding TPM Services to do...

Here is the script

Show Customer Dialog

Message: If ( TPM::TPM Next Due Date < Get (CurrentDate ) ; "You have outstanding TPM services" ; "You have no outstanding services")

I thought it would be that simple. So I created a TPM Due date Less that Current date and ran the script...."You have outstanding TPM Services"...GREAT! Then I deleted that record and ran the script again...""You have outstanding TPM Services" Oh!!! That isnt true!

 

PLEASE HELP I'M LOOSING THE WILL TO LIVE HERE!!!

Link to comment
Share on other sites

58 minutes ago, cheerfulzebra said:

a script to see if there are any outstanding TPM Services to do...

I am not sure what exactly an "outstanding" service means. I am quite sure that in order to see if there are any records that meet some criteria, you need to perform a find using said criteria and see if any records are found. Your script checks only the current record, which could be any record.

Alternatively, you could use a relationship, or the ExecuteSQL() function for the same purpose.

 

58 minutes ago, cheerfulzebra said:

You input the date you did the service and then it adds 3 months to that date and that appears in the Next Due Date Field.

I would expect a new record to be created after performing a service. Then it's easy to see which services are overdue, because their DueDate has passed and the ActualDate is empty.

 

Edited by comment
Link to comment
Share on other sites

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