1 of 1 people found this helpful
I've no idea why your calc doesn't work correctly – it does for me; and I couldn't observe that …
$myList = $First !!!
… but then in its current form the calculation is hard to debug …
[ $First = GetValue (List (T02_Partes_DETALLES_TRABAJADORES::Id_detalles_trabajador);1); //
$Second = GetValue (List (T02_Partes_DETALLES_TRABAJADORES::Id_detalles_trabajador);2);
You can make it much easier on the eyes (and any troubleshooting efforts) if you use Let() consequently:
Let ( [
myList = List (T02_Partes_DETALLES_TRABAJADORES::Id_detalles_trabajador) ;
$First = GetValue (myList;1) ;
Or you could do this:
Let ( [
myList = List ( T02_Partes_DETALLES_TRABAJADORES::Id_detalles_trabajador ) ;
myList = LeftValues ( myList ; 3 )
GetValue ( myList ; Get ( CalculationRepetitionNumber ) )
or simply this:
i = Get ( CalculationRepetitionNumber ) ;
i < 4 ;
GetNthRecord ( Extend ( T02_Partes_DETALLES_TRABAJADORES::Id_detalles_trabajador ) ; i )
btw, why are you using $vars as Let() variables?
thanks for your reply, the code is much clear the way you wrote it.
I used $vars to be able to track them from the data viewer for debugging.
The point of the Let calculation is to populate a repeating field, each value of the calculation to a "cell" of the repeating field.
I´m trying to do it working from this post: http://fmforums.com/forum/uploads/monthly_07_2012/post-80889-0-54620500-1341593871.png
The problem is i´m not able to format the myList in the rigth way to work in the last sentence: GetValue ($myList ; Get ( CalculationRepetitionNumber ) )
i can attach some screenshots on demand.
i´vent tried your last solution, but it works fine !!
the 2 first only populate the first repeating field, like my code.
What's the big picture here?
Why are you using repeating fields?
Why are you trying to populate them with a script variable - since a script variable disappears after you have run the script?