3 Replies Latest reply on Feb 21, 2013 9:28 AM by philmodjunk

    Repeat Fields and ExecuteSQL

    PJSpark

      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