Support Forums

Questions about surveying? How does this thing work? We're here to help!

The Forums are now closed, because much of the older info is out of date.

Check out our Knowledge Base, ask a support question: Support.SurveyGizmo.com or ask a sales question with our Sales Contact Form.

Current User: Guest

Logic coding question

Topic Locked
UserPost

12:36
July 2, 2009


RickK

Member

posts 7

I have a question with many subquestions, each having 3 ranking groups.  2 are likerts - Importance and Frequency and then the last is a “No Answer” group. We need to keep the 2 likerts separate but the “No Answer” is for the whole subquestion.

I either want the Importance AND Frequency scales filled in OR just the “No answer”.  Right now I have both the Importance and Frequency as a required fields.  The “No Answer” is not.  So they have to fill in the Importance and Frequency even if they have “No Answer”.SurprisedEmbarassed

Obviously these are not the results I wanted. How would I write the logic in the scripting language to do this?  My coding abilities are pretty rusty but will shine up pretty easily once I get started.  I've found a lot of help in the tutorials but don't see anything function specific to the groups.

Also is there a preferred book to use to learn the scripting language? I think I need a little more reading material Wink.


1:18
July 3, 2009


jonathan

Admin

posts 1129

Hey, Rick!

Our custom scripting follows most of the same basic concepts and syntax as PHP, the only essential difference is that we've created our own functions in place of PHP's default (like PHP ran() is sgapiRand() ) and where, in PHP, $ denotes a variable name, in our custom scripting we use %%.

That aside, I don't think you need custom scripting for this – the easiest way to do what you're trying to do is to offer your respondents to be able to answer both – let me explain.

Try making the questions NOT be required, then move the comments question to the next page and use an Advanced Show/When rule to show it only if the any of the previous questions were missed, and make this question required.

I hope I understood correctly, and that this helps. Enjoy!

Jonathan Turk, SurveyGizmo Account Manager
Did this answer help? Let us know!
Want to be a SurveyGizmo Expert? Learn here!

1:12
July 14, 2009


RickK

Member

posts 7

Hi Jonathan, thanks for the reply.

I guess I don't understand what you mean.  Here is a link to my survey http://app.sgizmo.com/surveybu…..?id=152331 - maybe we're not calling the parts of the puzzle the same thing/name?  If you look at Q6 (or maybe you already have) you will see what I mean.  I need both importance AND Frequency subquestions (and not No Answer) OR only No answer subquestion for each question. 

I get most of this: “Try making the questions NOT be required, then move the comments question to the next page and use an Advanced Show/When rule to show it only if the any of the previous questions were missed, and make this question required.”

Q6.”Install a NetworX system” is a required question (what do you call this main “question” – there too many things called “questions”) even though it is just a way to get a bunch of question (rows) and subquestions (columns) in the list.  I see the “required” checkbox after each question (row), so I could do what you say on that and each of the subquestions have the same option.

You lost me on the ”comments question”

If they don't have an answer they would click only group #3.

Maybe you can explain a little more?

1:39
July 15, 2009


jonathan

Admin

posts 1129

Woops! I misunderstood your “No Answer” option.

Looking at your survey, though, it looks like you've set up your questions in a Custom Matrix – but your “No Response” option is all on its own. You have a very specific use-case and there isn't an easy way to do what you'd like to do.

Essentially, you would need to add in a “No Answer” option for each of Importance and Frquency, and then write a custom script that goes through each row in your table to make sure that IF “No Answer” was selected on one, it was selected on both, if not, then use the custm script to jump the survey taker backwards.

This is really the only way to do what you're trying to do.

Jonathan Turk, SurveyGizmo Account Manager
Did this answer help? Let us know!
Want to be a SurveyGizmo Expert? Learn here!

1:51
July 15, 2009


RickK

Member

posts 7

DOH! Leave it to me to come up with a non-normal application ….. I knew it wouldn't be easy.Cry

It doesn't make sense to have them be able to select “No Answer” on half of the question and not the other.  I guess it is what it is then.  Does each sub questions have a partial question ID appended to them? Like Q1A, Q1B, Q1C etc?  Anything a script could filter on?

1:55
July 15, 2009


jonathan

Admin

posts 1129

Each ROW in a tabe is essentially its own question, so it has its own question ID.

In the custom matrix, you end up getting back an array of answers, so you would parse the array or loop it in a custom script.

Jonathan Turk, SurveyGizmo Account Manager
Did this answer help? Let us know!
Want to be a SurveyGizmo Expert? Learn here!

1:59
July 15, 2009


RickK

Member

posts 7

Thanks for the info Jonathan

2:05
July 15, 2009


RickK

Member

posts 7

One more thing J,

Where do you post the scripts.  I have a fella that is helping me and he keeps asking me that.

2:27
July 15, 2009


jonathan

Admin

posts 1129

No worries!

SurveyGizmo's Scripting control is an ACTION, so right next to where you click “Add Question” there's a link that says “Add Actions”, and from there you can select the SurveyGizmo Scripting control.

Jonathan Turk, SurveyGizmo Account Manager
Did this answer help? Let us know!
Want to be a SurveyGizmo Expert? Learn here!



The Forums are now closed, because much of the older info is out of date.

Check out our Knowledge Base, ask a support question: Support.SurveyGizmo.com or ask a sales question with our Sales Contact Form.