custom scripts for star rating questions and API logic set-up

0

two questions, the first concernning custom scripts and the other about setting question logic through the api.

1. star rating question
I have a survey that uses star rating questions to rate satisfaction, and i’m trying to compute a hidden value based on several star rating questions (using sgapigetvalue and sgapisetvalue).

i was able to do this with a radio button question in a different survy, but i cant manage  to grab the response value in this question.
how do I call sgapigetvalue command in this case?

attached: photo from the survey legend of a star rating question.

2. Logic
I have an excel macro that builds survies through the API calls, and it works fine. after the set up i acess the survey thrugh the site and finish tweeking it with logic and quota. 
I want to add to my restapi calls the ability to conditon a question on another question = it doesn’t have to be perfect, just the basic ‘display this question if #question-id is answered’. 

the documentation concerinng logic properties seems to be mosty about piping, with “properties[hidden]” (=TRUE?), and “properties[piped_from]” (=???).
is there an example of how to set up this kind of logic?

https://apihelp.surveygizmo.com/help/surveyquestion-sub-object-v5

I would appreicate any help!

denniswormald answered
    0

    Happy to add my two cents.

    I have found that the SG API functionality is inadequate for a lot of things, it is however possible to do almost anything by using a combination of webhooks and url variables. In this way, you put all the logic in your web application and then use url variables to pass the logic back into the survey by refreshing their browser with the new url. Does this make sense? Personally, I do this by coding all my logic in ruby on rails, put the questionnaire in an iframe, and reload the iframe when a new custom url is made for the next page of the questionnaire! It has its own quirks to get it to work, which I would be happy to share if you needed, for instance you need to pass the respondent id in a url variable each time then fetch it back in the webhook to keep track of the same survey as they move through it. It is complicated but much more powerful and less constrained once it is set up.

    denniswormald edited answer
      ×

      Login

      Question stats

      • Active
      • Views1301 times
      • Answers1 answer
      • Followers1 follower