3 Replies Latest reply on Feb 5, 2009 6:56 AM by mwc_1

    Empty Fields Script

    carlz_1

      Title

      Empty Fields Script

      Post

      Hi everyone,

       

      My application involves a large number of fields that must be filled out before the form can be printed out and submitted.

       

      Often times the data entry individual will not have all of the information at his or her hands to enter but will get bits and pieces at a time.  This makes mandatory field data entry (Not Empty) not feasible.

       

      I would like to create a script that will scan through the fields of a record looking for empty fields and pausing for data entry of the next field that is empty.  When that then gets filled out, the script continues and  moves on to the next empty field pausing for data entry if it is empty and then moves on again until the end of the record.

       

      Making a field mandatory Not Empty will not work because of the piecemeal fashion the information comes in and the way these things get put together.

       

      Thank you for any insight.

        • 1. Re: Empty Fields Script
          raybaudi
             Hi carlz

          > My application involves a large number of fields that must be filled out before the form can be printed out and submitted.

          If you let the user print ONLY by pressing a 'print' button, you can verify if one ( or more ) field is empty by scripting the print process.

          • 2. Re: Empty Fields Script
            ninja
              

            Howdy carlz,

            Thanks for the post.

             

            You could put a "Print" button on your layout that actually runs a "Check then print" script.

             

            The script would go to each field, check to see if it was empty, and endscript if it was empty thus leaving your cursor in the empty field.  If the script made it through all of the

             

             

            If [Field1=""]

                 GotoField[Field1]

                 Endscript

            EndIf

            If [Field2=""]

                 GotoField[Field2]

                 Endscript

            EndIf

             

             steps without bailing out of the script, you can have the last script step be to print.

             

            That should handle what you describe, no?  I've also seen many recommendations lately of using the "Case" function as well...you might want to check out which is more appropriate to you.  I personally prefer "If"s but both may work well.

            • 3. Re: Empty Fields Script
              mwc_1
                

              Why not attach a script to your submit or print process?

              Something that evaluates all your required fields at the time that they 'think' the record is ready.

              Something like...

               

              If [IsEmpty(fieldA)] or [IsEmpty(fieldB)]

              ...do something...

              Else If...

              End If....