July 28, 201114 yr Hi, Does someone know if there is a custom function that can copy a field from a child table to a repeating field? The child table field is a container. I need this because it's not possible to put a portal in a portal... Maybe I could create a recursive custom function using GetNthRecord, but does this function works on containers? Thanks
July 28, 201114 yr No custom function is necessary: use GetNthRecord() in conjunction with Get (CalculationRepetitionNumber).
July 28, 201114 yr Author That is exactly what I just tried and it doesn't work. The result only shows me the first record in the repeating field. Does not work, only shows the first record in the first repeating field. GetNthRecord ( comp_sale_PHOTOS__generals::photo; Get ( CalculationRepetitionNumber )) Does work and shows the 4th record in the first repetition GetNthRecord ( comp_sale_PHOTOS__generals::photo; 4) From the comparables table, the relations are Comparables >-- Sales --< Photos I don't know and really use repetitions, only in special cases...
July 28, 201114 yr As with any repeating field calculation, you must use Extend() with non-repeating fields referenced in the formula: GetNthRecord ( Extend ( Photos::ContainerField ) ; Get ( CalculationRepetitionNumber ) ) Or, even better: Let ( [ n = Count ( Photos::PhotoID ) ; i = Get ( CalculationRepetitionNumber ) ] ; Case ( i <= n ; GetNthRecord ( Extend ( Photos::ContainerField ) ; i ) ) )
Create an account or sign in to comment