El_Pablo Posted July 28, 2011 Posted July 28, 2011 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
comment Posted July 28, 2011 Posted July 28, 2011 No custom function is necessary: use GetNthRecord() in conjunction with Get (CalculationRepetitionNumber).
El_Pablo Posted July 28, 2011 Author Posted July 28, 2011 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...
comment Posted July 28, 2011 Posted July 28, 2011 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 ) ) )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now