In Field Calculator 1 To 9 Loop Numbers

1419
2
01-31-2017 11:16 AM
NeeleshSonekar
New Contributor

I have a field name gfdd i want to fill  A to I in loop till end. 

Like This

A B C D E F G H I A B C D E F G H I A B C D E F G H I A B C D E F G H I....................................................

And then i want to combine Map_ to gfdd in different field :

Like This :

Map_                    gfdd                    Test

46K1                        A                    46K1 A

46K1                        B                    46K1 B

46K1                        C                    46K1 C

46K1                        D                    46K1 D

46K1                        E                     46K1 E

46K1                        F                     46K1 F

46K1                        G                    46K1 G

46K1                        H                    46K1 H

46K1                         I                     46K1 I

46O1                        A                    46O1 A

46O1                        B                    46O1 B

 

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor

Combining the two fields, once you have them, if fairly straightforward.  For generating the gfdd field, the following should work using the Python parser:

Pre-Logic Script Code:

from itertools import cycle
rot = cycle(chr(i) for i in range(65,74))
def next_letter():
    return next(rot)‍‍‍‍

Value:

next_letter()

NeeleshSonekar
New Contributor

Thank you Very Much............Very Helpful For Me.................

0 Kudos