Jump to content

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


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 post
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 post
Share on other sites

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
  • Similar Content

    • By tomp
      I'm having a problem getting BE_SMTPsend to successfully send an email with an attachment.
      No problem sending without an attachment, but when I add an attachment, I get an error 2 (not sure exactly what that means, but without the attachment, no error)
      These are the argument strings with and without attachments:

      I have tried both relative and direct file paths for the variable $attachment. Examples are:


      Both of them return an error code of 2.
      Since the 'send' without an attachment works, all the values of the fields/variables other than $attachment must be valid.
      Can anyone offer a suggestion as to what might be going on and what I might try to resolve this?
       
    • By Msaeed
      Hi All,
      As per mentioned on topic, in fact i would like to create icon ex. hour in case rigging guard the insert time.

    • By Solvax
      Hi,
      I'm trying to make a subsummary report with data from the current table and a related table.
      I never get to display the correct totals for the related table, and would therefore appreciate your help.
      First I'll try to explain the workflow:
      I have two tables called 'Voorraad_uit' (= outgoing stock) and 'Voorraad_in' (= incoming stock) which are related by delivery number.
      Data is first entered in 'Voorraad_in' (= incoming stock) and then related records are created in 'Voorraad_uit' when an incoming stock item is partly or completely shipped.  This second table contains mainly the outgoing amount and a unique outgoing delivery ID.

      As a consequence, one record in table 'Voorraad_in' (= incoming stock) can have one ore more related records in 'Voorraad_uit' (=outgoing stock).
      I want to make a subsummary report showing the total amount of incoming and outgoing units per product(name) by using the following layout structure:

      I tried two scenarios which each give me a part of the desired result.
      when I base the layout on 'Voorraad_in' (=incoming stock): I get the right totals for incoming deliveries I get all the incoming deliveries listed (also those without outgoing delivery) Body part 3 (see above) only shows one row also when there are more than one related outgoing transactions I get the wrong totals for outgoing deliveries (only based on one record) when I base the layout on 'Voorraad_uit' (=outgoing stock): I get the wrong totals for incoming deliveries I don't get all the incoming deliveries listed (only those with outgoing delivery) Body part 3 (see above) shows all the related outgoing transactions I get the right totals for outgoing deliveries Main goal is having the right totals for both incoming and outgoing deliveries..
      My layout is sorted ascending by (in mentioned order) productname, incoming delivery number and outgoing delivery number.
      The totals are calculated by using summary fields.
      I hope I'm on the right track and that the desired result is possible.. your help is much appreciated!
      Thanks in advance for your help.
      Regards,
      Solvax
    • By Steve Pfister
      Security Challenge when signing on to Paypal through Filemaker pro 18 web viewer.    I see the text "Security Challenge" but nothing else shows up... all is invisible, making it impossible to solve the security challenge and sign in....  Mac Pro..OS High Sierra 10.13  ....running Filemaker 18 .     I am having Java script issues I am assuming.   Has anyone else had this similar issue and solved it?
      Thank you in advance
      Steve
    • By Pio Soto
      Hi, I was wondering if it's possible to add some design to my email, 
      I have attached a sample of what I'm looking for but the idea I got is from my quickbooks email invoice.
      Thanks.

  • Who Viewed the Topic

    10 members have viewed this topic:
    David New  ping  cymainformatica  John.M  xlbycharles  3DSteve  prosoft  sirsancho09  muskee  FMDuck 
×
×
  • Create New...

Important Information

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