April 9, 200421 yr Hi All, I'm creating a questionnaire for subjects in a psychology experiment. I have one table containing all of the questions, and have created a separate layout for each question (so one question appears per layout along with a "next" button advancing you to the next layout with the next question on it). I want to include validations such that people MUST respond to each of the questions before moving forward. When I have tried to do so, it seems that the program wants ALL of the conditions for the entire table met for each layout/question. For example, I complete question 1 (select a radio button number), then click next to move forward, but receive a pop-up informing me I must make a selection before I continue. Any ideas? I'm totally new to Filemaker, so any and all suggestions would be very much appreciated. Thanks. Cheers- Johanna
April 9, 200421 yr Johanna: Create a different script for each "next" button, and do the validations there. Each script would look something like this (with the correct layouts/fields for that step of the process): If ["IsEmpty(Field_In_Question)"] Show Message["You must answer the question first!"] Go To Field ["Field_In_Question"] Exit Script Else Go To Layout["Your_Next_Layout"] Go To Field["Answer_Field_In_Next_Layou"] End If Note that the "Show Message" step allows for up to three buttons. In your case, leave the first two buttons blank, and make the third one just say "OK" so as to prevent the user from getting confused ("Continue? Cancel? Cancel what?")... -Stanley
April 9, 200421 yr You can also validate your fields by Status(CurrentLayoutName), e.g. not IsEmpty(field1) or not PatternCount(Status(CurrentLayoutName), "question1"), if your layout for field1 contains 'question1' in its name and no other layout does.
Create an account or sign in to comment