3 Replies Latest reply on Apr 23, 2014 5:33 AM by erolst

    Calaculation to send automatic Email Error ?????

    Ragupathi

      Hi every one ,

       

      I just created Tool database in feild name called Stroke count

       

      Daily i will update the Stroke count If every 20,000 reach filemaker should send the Automatic email but

      for Stroke count should count continusly

      eg

       

      stroke count 19,000

       

      Temp Storke Count= 1000

       

      stroke count = 20,000

       

      Automatic email should send

       

      Temp storke Count = 2000

       

      Stroke Count = 22,000

      .

      .

      .

      .

      .

      .

      .

      .

      Temp Storke Count = 2000

      Stroke Count = 40,000

      then again Automatic Email should sent

       

      Temp Storke count - 4000

      Stroke Count = 60,000

      then again Automatic Email should sent

      .

      .

      .

      .

      .

      .

      .

      .

      How to do this correct calculation because my calculation is send the mail only first 20,000 only

      can anyone help me

        • 1. Re: Calaculation to send automatic Email Error ?????
          erolst

          Assuming you actually have two fields 'strokes' and 'strokesTemp', use a script and two trigger events to check the value on enter and on save:

           

          OnEnterAndSave

          #define onEnter and onSave triggers for your temp field and give each trigger a different script parameter

          #

          Set Variable [ $sp; Value:Get ( ScriptParameter ) ]
          Set Variable [ $theOffset; Value:20000 ]

          Set Variable [ $divCount; Value:Div ( Sampler::strokes + Sampler::strokesTemp ; $theOffset ) ]

          #

          If [ $sp = "enter" ]

            Set Variable [ $$divCountOnEnter; Value:$divCount ]

          End If

          #

          If [ $sp = "save" ]

            Set Field [ Sampler::strokes; Sampler::strokes + Sampler::strokesTemp ]

            Set Field [ Sampler::strokesTemp; "" ]

            If [ $divCount > $$divCountOnEnter ]

              #do stuff, e.g.

              // Send Mail [ Send via E-mail Client ] [ No dialog ]

            End If

            Set Variable [ $$divCountOnEnter; Value:"" ]

          End If

          1 of 1 people found this helpful
          • 2. Re: Calaculation to send automatic Email Error ?????
            Ragupathi

            If dont mind can you send the Filmaker file which you tested this Script Because its not show error

            • 3. Re: Calaculation to send automatic Email Error ?????
              erolst

              Don't have it anymore; why don't you post yours?

              Ragupathi wrote:

              Because its not show error

              Not sure what you mean by that …