I need a function to be called before the refresh so added my code to the ssjsSelectFunction. However, I noticed that this was never being called and a quick look at the code shows that you're returning before calling the function in each of the blocks. Example:
if(compositeData.onReturn.toString() == "Set Scope Value"){</div>
var test = @Left(eval(compositeData.varName), ".") + ".put('" + @Right(eval(compositeData.varName), ".") + "','" + valueselected + "')"</div>
<strong>var returnvalue = eval(test)<br/>
return returnvalue</strong></div>
if(@Trim(compositeData.ssjsSelectFunction) != ""){</div>
eval(compositeData.ssjsSelectFunction + '(' + valueselected + ')')</div>
</div>
I tried moving the return to after the function being called but this resulted in an error.
Has this functionality being blocked for a reason?
Aidan Cooper
</div>
if(compositeData.onReturn.toString() == "Set Scope Value"){
var test = @Left(eval(compositeData.varName), ".") + ".put('" + @Right(eval(compositeData.varName), ".") + "','" + valueselected + "')"
var returnvalue = eval(test)
if(@Trim(compositeData.ssjsSelectFunction) != ""){
log.logEvent("Calling ssjsSelectFunction " + compositeData.ssjsSelectFunction)
eval(compositeData.ssjsSelectFunction + '(' + valueselected + ')')
return returnvalue