3 Replies Latest reply on Apr 22, 2015 9:26 AM by philmodjunk

    Field Not Empty Based On Criteria

    DanielGordon

      Title

      Field Not Empty Based On Criteria

      Post

      I need to ensure that certain fields within a table are not left empty upon completion, some users forget to update these based on the type.

      I have 3 main fields that are key;

      Type: test 1, test 2, test 3, test 4  

      Time Spent:

      Date Completed:

      I need to find the best way of ensuring that the time spent field is not empty if the date completed field is updated and the type selected is either Test 1 or Test 2.

      Test 3 and Test 4 are reported in a different way 

      I hope I have explained the above.

      Many thanks for your time

        • 1. Re: Field Not Empty Based On Criteria
          philmodjunk

          What do you mean by:

          if the date completed field is updated

          ?

          Does this mean that the field may already have a date and a different date was added at the time you need to check for empty fields? Or do you just mean that this field is not empty?

          • 2. Re: Field Not Empty Based On Criteria
            DanielGordon

            The date completed field will be empty. The trigger point will be when a date is inserted into this field.

            • 3. Re: Field Not Empty Based On Criteria
              philmodjunk

              One way is to open field options for Time Spent and set up this validation calculation:

              I need to find the best way of ensuring that the time spent field is not empty if the date completed field is updated and the type selected is either Test 1 or Test 2.

              ( Not IsEmpty ( Self ) and Not IsEmpty ( DateCompleted ) and PatternCount ( "Test 1|Test 2" ; typeSelected ) ) or

              IsEmpty ( DateCompleted ) or

              Not PatternCount ( "Test 1|Test 2" ; typeSelected )

              You may find that it's better to set up the OnObjectValidated script trigger to run a script that checks these values as this can allow you to produce a more user friendly response to the error and provide the user with better ways to correct the error than the standard options that appear with a validation error. from field options.