[Solved] Merge Code: Display row headers from grid



I am not able to find a solution to insert all row items from a grid that were answered with “2” (number of columns = 3) into a question title.

You previously indicated that you purchased (row items from question C2 with answer [2]) within the last 5 years only from other lighting manufacturers than “Client Name” due to product accessibility.
Would you generally be willing to buy these products at “Client Name”? Please explain shortly.

Thanks in advance!

Christian selected answer

    Best answer


    Other survey but same issue:

    %%output .= “<strong>Regarding the services mentioned previously:<ul>”;

    %%table1 = sgapiGetTableQuestionSkus(990);
    %%table2 = sgapiGetTableQuestionSkus(998);

    %%table = sgapiArrayMerge(%%table1,%%table2);

    foreach (%%table as %%header => %%val) {
      %%answer = sgapiGetValue(%%val);
      if (%%answer == “Yes”) {
        %%title = sgapiGetTitle(%%val,”German”);
        %%output .= “<li>” . %%title . “</li>”;

    %%output .= “</ul></strong>”;

    Christian edited answer

      @Christian :

      Merge codes will not work for your conditional use case. This is something that you would need to build out using Custom Scripting. If you would like to try your hand at this you can find the documentation here:


      Alternatively, this is the kind of customization that our Programming Services team can build out for a fee. You can learn more about Programming Services here:


      I hope this helps!

      The SurveyGizmo Team

      Community Admin commented
        • Hey Bri,
          there is a huge number of SurveyGizmo functions. Which function is the right one to display the selected row items to the question title?

        • @Christian: It’s difficult to say exactly as I am an amateur when it comes to scripting which is outside the scope of our support.

          On the surface, based on what you describe, you would need to use sgapiGetValue for each row to determine the answer to each row. Then you would need to use sgapiSetTitle to change the subsequent question title based on the values given for each row.

          Sorry I can’t be more help.

          The SurveyGizmo Team



        Question stats

        • Active
        • Views8741 times
        • Answers2 answers
        • Followers1 follower