7 Replies Latest reply on Oct 24, 2012 10:52 AM by yomango

    Making NotEmpty validation option on a repeated field

    yomango

      Title

      Making NotEmpty validation option on a repeated field

      Post

           Hello out there. I have a repeated field that needs to be populated with a "Y", "N" or "N/A" . I'd like to know how to go about setting that condition other than through the Database Manager since this way, if I populate the first repetition any other repetition left unpopulated is taken as populated. Thank you

        • 1. Re: Making NotEmpty validation option on a repeated field
          philmodjunk

               Open Manage | Database | Fields

               Select field options for you field.

               Select the validation option.

               Create a validation rule with the Count Function:

               If your field has 5 repetitions and there needs to be a value in all 5, use:

               Count ( Self ) = 5

               But there's a very good possibility that you should be using a related table instead of a repeating field. Repeating fields, a hold over from when FileMaker tables could not be linked in relationships, is only rarely the best design option.

          • 2. Re: Making NotEmpty validation option on a repeated field
            LaRetta_1

                 Hi Mauricio,

                 Y/N suggests that you have questions which are also repeating field.  As suggested, each question should be a record and the answers should be related table to the question.  Data shouldn't be in repeating fields because it is very difficult to retrieve the data when needed.  You also can't group or summarize by response if using repeaters because a record can only appear in one group at a time.

                 One fact per field is the way to go.  If you need assistance in setting up a relationship just let us know.  :-)

            • 3. Re: Making NotEmpty validation option on a repeated field
              yomango

                   Hi. I thank you both PhilMod and LaRetta for taking your time to answer. Phil[s advise works to an extend but I am having two problems, at the creation of a new record, a warning window pops up with the option to Revert, Allow or Reject the Validation and I do not want the user to be able to Allow an empty answer. The file has three tables, Subject, Clients and Visits. The subject client has just one repeated field (28 repetitions) listing a series of questions. Clients table is self explanatory and the layout has a portal to Visits, When an ADD VISITbutton is pressed, it takes me to Visits layout which has (besides the related fields it needs) two repeted fileds fields to accomodate the subject and its corresponding answer. I need for the user not to skip an answer but when I get from Clients to Visits through the Add Visit button, I get that pop up warning. what you two suggest is to create in the Subject Table 28 records, each with a question? And in Visits, 28 fields, each with an Answer? Before I wanted the Answer NOTEMPTyY validated, everything worked the way I had it. What would be your final suggestion? Again, thank you very much.

              • 4. Re: Making NotEmpty validation option on a repeated field
                philmodjunk

                     at the creation of a new record, a warning window pops up with the option to Revert,

                     That shouldn't happen unless something is committing the newly created record.

                     I definitely recommend replacing your repeating field with a related table of records, but this should not result in "in Visits, 28 fields, each with an Answer".

                     What you describe sounds very similar to a survey. In surveys, you typically have a table of questions asked where you have one record for each question, a related table where you have one record for each person answering the questions and a "join" table that records one person's responses to a given set of question records.

                     In your case you appear to be recording the client's repsonses to questions during each "visit", but I have no idea what purpose is served by your "Subject" table.

                     You might find the following thread on surveys helpful: Need aid on generating a report from a survey layout.

                • 5. Re: Making NotEmpty validation option on a repeated field
                  yomango

                       Thank you, Phil. The Subject table is where I place a templet of the questionary items (one,28repetitions field). The questions are alwayys going to be the same 28. I want the questions to show all in one screen with the corresponding answer field next to it, not to navegate nor create a neggestionsw record for every asked question. So, I thank you for the advise and the time spent on answering my questions.  

                  • 6. Re: Making NotEmpty validation option on a repeated field
                    philmodjunk

                         Yes, but you can list 28 questions all on the same screen and they can be 28 different records. That's why we have a List View option for our layouts. You can pull up the desired questions (can be all of the questions or a selected sub set) on such a layout and the user selects/enters their responses. And there isn't any repeating field nor 28 separate fields needed.

                    • 7. Re: Making NotEmpty validation option on a repeated field
                      yomango

                           You are right. I did not think about the List view though. Thanks for the enligthment