1 2 3 4 Previous Next 45 Replies Latest reply on Jul 7, 2017 6:05 AM by bigtom

    Conditional questionare


      I would like to create a questionnaire for my staff when they need to do some writing.


      the only problem is, is that the questions depend on the type of writing.


      I have a solution but it is messy so wondered if anyone had a better idea?


      My solution would be choose type  (press release, Article, Case study)

      If press release (new solution, New Client, New Partner)


      following that the user gets up to 13 fields to fill in. I was going to call them Field1, Field2 ....Field13 and the questions I would hide or show depending on the type of writing.


      My problem with this is that if circumstances change and a press release becomes an article then I will suddenly have answers to questions that make no sense. 


      Also If i want to add another type in later i will have to faff around changing hide and show rules.


      any Ideas?

        • 1. Re: Conditional questionare

          Yep, I would draw up some mock-ups of how you want the application to behave and look like long before thinking about a computer solution. Define your business rules. Then think about the database and how to make it all work from a data perspective. Then, and only then, think about cranking up FMP or any other development program.


          HOPE THIS HELPS.

          • 2. Re: Conditional questionare

            I already have the data base, this is going to be an add on feature. Still thinking of solutions I have the idea of coming up with a table with the field Type and Questions, but only show the question in the form depending on type. Is that possible?

            • 3. Re: Conditional questionare

              Sure, just about anything is "possible". Doing a simple "Find" search, you could limit what's shown on a form in nearly limitless ways.


              I'm a "top-down" designer so please understand I start by drawing out what I want the screen to look like and the visually indicate actions that should happen.


              Think of the construction metaphor. Would you let a builder build your dream house without blueprints? This metaphor applies to software but is often avoided (read about failed software projects in Code Complete 2 and other texts).

              • 4. Re: Conditional questionare

                It is absolutely possible. One thing you need to decide is what happens to old answers if a project changes type. Are they still relevant and should be kept connected to the project? Should they be discarded and new questions answered?

                • 5. Re: Conditional questionare

                  I know what the form will look like, we have paper versions, but we have 5 of them. I want one interactive one that changes the questions depending on the type.

                  • 6. Re: Conditional questionare

                    That is a good point, I guess i could hide questions if they are not relevant unless they have an answer in them.

                    • 7. Re: Conditional questionare

                      Just decide what you want and how you want them to look. After that you might still have a few ways to get tot he same place.

                      • 8. Re: Conditional questionare

                        what about if I did a sub summary when sorted by type, that would only show fields with responses in them?

                        • 9. Re: Conditional questionare

                          actually that wouldn't work

                          • 10. Re: Conditional questionare

                            The thing that comes to mind is a related table with question and answer fields. These records could be built via another table that is type and question. Once a question is answered as part of a project it is always related no matter how many times they type might change.


                            Questions get answered in the portal/portals.


                            Not super elegant but when a project gets a type selected it runs off to the related table and generate a bunch of records with questions for type and then back to your project layout. You will see all the unanswered questions.

                            • 11. Re: Conditional questionare

                              so each question is it's own record with the type. then another table that the questionnaire is built on is related by type so will only show related records in a portal. where are the answers stored?


                              currently I have a table called Content where details about the type, deadline etc are asked. I will create a new table called Content_Questions with all the questions and the type and they are related when Content::type=Content_Questions::type


                              What I can't work out is where to store the responses?

                              • 12. Re: Conditional questionare

                                so my solution is to have another table called responses. each question in content_questions has a question-id and each response will have kf_question_id and they can be related when equal


                                so content::type=content_question::type  and content_question::kp_question_id=responses::kf_question_id


                                so portal will only show related questions and answers?

                                • 13. Re: Conditional questionare

                                  You can do that if that will work for you. I often like to try to keep any question/answer stuff together. if the questions change later the old answer still need to be relative to the old questions. Just something to think about.

                                  • 14. Re: Conditional questionare

                                    I could use a lookup function to get the question into the answer table then if they change it won't affect old records?

                                    1 2 3 4 Previous Next