5 Replies Latest reply on Mar 22, 2010 9:43 AM by JohnDuncan

    Trapping for "No records are present" in List View

    ralvy

      Title

      Trapping for "No records are present" in List View

      Post

      When there are no records in the found set in List View, I find that clicking a noneditable field in that view will elicit the following error message:

       

      No records are present. To Create a new record choose the New Record menu command.

       

      How do I trap for this error message?

        • 1. Re: Trapping for "No records are present" in List View
          JohnDuncan

          If you are in List view and there are no records showing then the only thing that shows is the Header/Footer.  If the fields are truly non-enterable in the Header then you could use Merge fields instead.  Those will not cause the dialog when you click on them.

          • 2. Re: Trapping for "No records are present" in List View
            ralvy

             


            John Duncan wrote:

            If you are in List view and there are no records showing then the only thing that shows is the Header/Footer.


             

            Not my experience in this layout. I have a global filter field that narrows the found set dynamically as the user types characters (using script triggers). When a null found set is reached, the body still displays, showing no record. Also, the area beneathe the body displays. There is no footer in this layout. When the user clicks on either the naked body or the area below it, they get the noted error message.

             


            • 3. Re: Trapping for "No records are present" in List View
              JohnDuncan

              Try putting the global filter field in the header.

              • 4. Re: Trapping for "No records are present" in List View
                ralvy

                That global filter field is in the header.

                 

                I did more testing. I created a simple List View layout that has a header, body, and footer, with a single editable text field in the body. When the found count is zero, any attempt to click on the white space below the header produces that error message. Since I can't see how to trap for that error, it looks like I'll have to script ways to kick the user out of that layout when the found count drops to zero. I had no idea List View has this problem.

                • 5. Re: Trapping for "No records are present" in List View
                  JohnDuncan

                  You are correct sir.  If there is a field displayed it produces the message.  Its not a bug or problem its a feature, FileMaker has delivered this message when no records are present as far back as I can remember (FileMaker Pro 2.1).  I'm not aware of any way to trap for it.

                   

                  If however you substitute a merge field for the field you do not get the message however the user will not be able to edit the record when there are records showing.  When they click on it you could then take them to an editable layout if there are records present or provide a message of your choosing when there aren't.  You'll need to use Script Triggers to flip them between the two layouts based on clicking and records showing.