title: Sourcing Global Function from an Anonymous Function that Returns in Adobe DTM
body: <p>The below code snippets are not the actual code, they are only there to explain my issue. So please don't concentrate on the actual functionality. I'm working with Adobe DTM. I have no idea how to get an anonymous function that returns a value (as a Data Element to source a global function? If I have a normal anonymous function within my data Element, everything works fine. If the anonymous function returns, then it doesn't work? Is there any way to get this to work? Example:</p>
  
  <pre><code>//global function
  function _myGlobalFunct(str){
  return (str);
  }
  </code></pre>
  
  <p>the following code of an anonymous function within the Data Element calls global function and it works as expected:</p>
  
  <pre><code>// working anonymous function
   (function () {
   window._myGlobalFunct("value1");
   })()
  </code></pre>
  
  <p>but the following return anonymous function, within the Data Element, doesn't call my function but doesn't throw any errors? :</p>
  
  <pre><code>// Not Working Properly but doesn't throw any errors?
  return (function() { 
  var rvalue = document.title || "No Title";
  window._myGlobalFunct(rvalue);
  return rvalue;
  })();
  </code></pre>
  
  <p>I do know the function is executing but not getting any errors in Chrome?</p>