3 Replies Latest reply on Oct 3, 2011 10:31 AM by brian.bentley

    Data Entry question



      Data Entry question


      I am trying to configure different fields in a database. I would like to have Filemaker alert me when the I enter a field and try to override current data. For example, I would like to be alerted if the new entry is a number less than the original entry. Any suggestions?


        • 1. Re: Data Entry question

          Use an OnObjectEnter trigger to capture the current field value in a global variable.

          This can be a single line script:

          Set Variable [$$OldValue ; value: YourTable::YourFIeld]

          You can use the same script with multiple fields if you pass GetFieldName ( YourTable::YourField ) as a script parameter to the script and use this line:

          Set Variable [$$Oldvalue ; value: GetField ( Get ( ScriptParameter ) )]

          Now a validation calculation can test self against $$OldValue to see how they match up:

          Self > $$OldValue

          could be used to trigger a validation error if the value entered is less than the original. You'll need to modify this if negative values are possible valid entries as an initial value in the field.

          • 2. Re: Data Entry question

            Thank you so much! I am able to get it to work with the original field, but am having trouble geting it to work with additional fields.

            • 3. Re: Data Entry question

              I found my missing step and now it works for all the fields. Again, Thank you so much!