AnsweredAssumed Answered

Execute SQL in Repeating Fields

Question asked by jgomes384 on Feb 13, 2015
Latest reply on Feb 13, 2015 by erolst

Hello -

 

I am attempting to use Execute SQL in a repeating field in the following way:

 

In Table1 I have a field (Days365) with 366 repetitions - representing every date including Feb 29th

 

In Table2 I have a number of records with date fields that then allows me to calculate the repetition number the date corresponds with.

 

I have set-up the following ExecuteSQL in my repeating field:

 

ExecuteSQL ( "SELECT Sum(Hours) FROM Table2 WHERE  EmpID = ?  AND RepNr = ? AND RecYear = ?" ; "" ; ", " ; Table1::E_ID ; Get ( CalculationRepetitionNumber ) ; Table1::Att_Year )

 

I have also tried Get ( ActiveRepetitionNumber ) in place of Get ( CalculationRepetitionNumber )

 

I'm not getting any "?'s" as a result so I'm not sure if this is a limitation of FM or is there another way to get the repetition number?

 

Thanks,

Jason

Outcomes