Example Script
The below script pipes the table question titles for all the rows that are rated either 4 or 5 on the previous page into this table question.
%%original_table = sgapiGetTableQuestionTitles(51);
%%followup_table = sgapiGetTableQuestionTitles(61);
%%row_to_hide = array();
foreach(%%original_table as %%row_id => %%row_title)
{
if(sgapiGetValue(%%row_id) != 4 && sgapiGetValue(%%row_id) != 5)
{
%%row_to_hide[] = %%row_title;
}
}
if(sgapiCount(%%rows_to_pipe) == 0)
{
sgapiHideQuestion(61,true);
}
else
{
sgapiHideQuestion(61,false);
foreach(%%followup_table as %%row_id => %%row_title)
{
sgapiHideQuestion(%%row_id,false);
foreach(%%row_to_hide as %%title)
{
if(%%title == %%row_title)
{
sgapiHideQuestion(%%row_id,true);
}
}
}
}