• ssjsSelectFunction not being called

    By Aidan. Cooper 1 decade ago

    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() == &quot;Set Scope Value&quot;){</div>
    
    var test = @Left(eval(compositeData.varName), &quot;.&quot;) + &quot;.put(&#39;&quot; + @Right(eval(compositeData.varName), &quot;.&quot;) + &quot;&#39;,&#39;&quot; &nbsp;+ valueselected + &nbsp;&quot;&#39;)&quot;</div>
    
    <strong>var returnvalue = eval(test)<br/>
    return returnvalue</strong></div>
    
    if(@Trim(compositeData.ssjsSelectFunction) != &quot;&quot;){</div>
    
    eval(compositeData.ssjsSelectFunction + &#39;(&#39; + valueselected + &#39;)&#39;)</div>
    
    &nbsp;</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

    &nbsp;</div>
    

     

    if(compositeData.onReturn.toString() == &quot;Set Scope Value&quot;){
    
    var test = @Left(eval(compositeData.varName), &quot;.&quot;) + &quot;.put(&#39;&quot; + @Right(eval(compositeData.varName), &quot;.&quot;) + &quot;&#39;,&#39;&quot; &nbsp;+ valueselected + &nbsp;&quot;&#39;)&quot;
    
    var returnvalue = eval(test)
    
    if(@Trim(compositeData.ssjsSelectFunction) != &quot;&quot;){
    
    log.logEvent(&quot;Calling ssjsSelectFunction &quot; + compositeData.ssjsSelectFunction)
    
    eval(compositeData.ssjsSelectFunction + &#39;(&#39; + valueselected + &#39;)&#39;)
    
    return returnvalue
    
    • Fixed

      By Aidan. Cooper 1 decade ago

      I've fixed the issue.  Sending the code over in a minute!

      • Updated for 1.2.2

        By mark t hughes 1 decade ago

        Remember to update for the link and multivalue buttons as well as just the single value.