AnsweredAssumed Answered

Repeat Fields and ExecuteSQL

Question asked by PJSpark on Feb 20, 2013
Latest reply on Feb 21, 2013 by philmodjunk

Title

Repeat Fields and ExecuteSQL

Post

     Hi,

     I'm trying to create a calculation field that repeats twelve times ( one for each month ), by using the new sql function:

      

     Let([
     T=ExecuteSQL ( 
     "SELECT sum(Total)
      FROM Details
      WHERE \"Year\"=? and \"Month\"=? and CID=? and HC=?"
      ; "" ; "" ; Details::sYear;Get ( CalculationRepetitionNumber );CID;HC)];
      
     If(IsEmpty(T);0;Round(T;0))
     )
      
     This only gives answer in first rep and zeros in all others. The Extend function only seems to work directly with fields.
     Any Ideas?
      
     Thanks

Outcomes