With just two values, the calculation could simply switch the positions within the 2-group.
Now within the 4-group you need the reciprocal positional value.
Try this generic form:
Let ( [
r = Get ( RecordNumber ) ;
g = 4 // the desired group size
Ceiling ( r ; g ) + 1 / r
Thank you Erolst for the suggestion.
However, FM 15 says on entry, "There are too many parameters in this function."
What could be the problem?
there's a typo in there: use / instead of ; in the Ceiling function.
If that doesn't work, I whooped this one up ...
rec = Get(RecordNumber);
width = 4;
col = Mod ( rec - 1; width );
rowEnd = width * Ceiling ( rec / width )
rowEnd - col
Wow, FM forum is really great!
Thanks a million for your quick help:-)
David, next time please give a me a few minutes to let me do my own corrections?
Hi erolst, I had been working on a function for my own edification and posted it just for giggles. Sorry for the collision.