[Solved] Getting a single option from a Continuous Sum using a custom script


I would like to get a single option from a Continuous Sum response and  put it in a hidden value and use it with a merge code in future question.

Here is what I have so far:

The Continuous Sum is and should continue to be ‘Percent’! I have a pro account.

// getting and option from a continuous sum and psss it to a merge code
%%source_id = 477; //question id

%%source_value = sgapiGetValue(%%source_id); //values of the quesiton

%%target_id = 863; // hidden value action

%%source_option_sku = 11491; // option sku

%%option = %%source_value{%%source_option_sku}; // getting the option sku?

%%test = 100; // this passes through if replace %%option below

if (sgapiIsAnswered(%%source_value)) sgapiSetValue(%%target_id,%%option);

// end

The %%test value can be used just fine.

Any help you could give would be greatly appreciated.


Mary L (Moderator) selected answer

    Best answer


    Hi Roger,

    You may be able to complete this without using custom scripting or a hidden value.  You can use merge codes to pull a single option from within a continuous sum question.   See my screen shot below.  I used a hidden value to display the merge code but you can just copy/paste that value and use where you want.  If you need to use custom scripting, let me know and I will see you an example of how to do it.   

    Roger commented
      • I did manage to do this using custom code, but like all great surveys, things changed and I ended up not using it! Your solution looks great and would have worked… Great to have this a solution going forward. Thanks for posting,




      Question stats

      • Active
      • Views687 times
      • Answers1 answer
      • Followers1 follower