Jump to content

Validations from 1 table across several layouts


jmj

This topic is 7314 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7314 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.