AnsweredAssumed Answered

Switch numbers in attribute field

Question asked by pil0706 on Aug 16, 2016
Latest reply on Aug 16, 2016 by pil0706

 

I am trying to switch numbers between rows

 

here is the thing

 

there are 8! (40320) cases that i need to make arraying numbers in total 

E.g., (8*7*6*5*4*3*2*1) : (0, 1, 2, 3, 4, 5, 6, 7) (1,0,2,3,4,5,6,7)(1,2,0,3,4,5,6,7) (1,2,3,0,4,5,6,7) .... (7,6,5,4,3,2,1,0)

 

so i am going to create 40320 fields and trying to put number in it.

I was thinking that i could use Random number generator but it returns duplicate number in rows and also it might have a chance to have duplicate fields.

 

Are there any ways that i can do this easy way using field calculator's code block?

Outcomes