3 Replies Latest reply on Jun 27, 2012 2:22 PM by philmodjunk

    Field not verifying



      Field not verifying


      Here's my new problem:


      I have a layout that shows data from a registration table as well as a portal that shows classes and fees from an enrollment table along with a total field for each fee (also from the enrollment table).


      The classes and fees display properly in the portal, and the total fields display and update properly if a class is added to the enrollment table..


      At the bottom of the layout, I have registration table field that adds the two total fields together and show total fees.  This field in the registration table is marked to auto-enter as a calculated value (the total of the two fields from the enrollment table).  It is also marked to ALWAYS validate by the same calcuation.


      Here's my problem:  When I add a registration record and it goes to get the enrollment information, it completes this field properly.  But if I add an enrollment record, although it updates the two total fields, it does NOT update this field.

      It seems to me that if it's supposed to ALWAYS validate according to this calculation, it shoudl update this field when the fields in the calculation change.


      Any ideas?



        • 1. Re: Field not verifying

          I don't see why you would use the same calculation for validation and as an auto-enter calculation, but it's not the reason the field isn't updating correctly. This is a basic limitation of auto-enter calculations--they do not update automatically if the field containing the updated data comes from a different table as is the case here.

          Make this a field of type calculation and it will update correctly. You cannot set a validation rule on a calculation field so you'll need to explain what this validation rule is intended to do before anyone can suggest a way to manage that requirement while using a calculation field to display the sum of these totals.

          • 2. Re: Field not verifying

            I didn't really understand the difference between the auto-enter calculation and the validation calculation  and would love to understand that better.  I assumed that auto-enter is for when the record is created and validation is for each time the record is displayed.


            I changed the field to calculation and you're right.  It works perfectly.  That was very simple.  Don't know why I chose auto-enter calculation instead of a calculation field.


            Thanks for the help.





            • 3. Re: Field not verifying

              A validation calculation is used to trap for data entry errors. It should evaluate as True or a nonzero number if the data entered is valid and as False, 0 or null if it is not valid.

              So if it's a number field and the number entered can't be larger than 100, you might use a validation calculation such as:

              Self < 100

              so that an error message (and you can create the message displayed), will appear if the person enters a value such as 101 along with an option to revert the value if so desired.