Skip to main content
added 111 characters in body
Source Link
Jannik
  • 173
  • 3
  • 11

In field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

This is the result. Field ORDER_ID is already calculated manually (i select GROUP_ID and use autoincrement). enter image description here

enter image description here

What changes script needed to use it in field calculator?

In field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

enter image description here

enter image description here

What changes script needed to use it in field calculator?

In field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

This is the result. Field ORDER_ID is already calculated manually (i select GROUP_ID and use autoincrement). enter image description here

enter image description here

What changes script needed to use it in field calculator?

added 173 characters in body
Source Link
Jannik
  • 173
  • 3
  • 11

IIn field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

enter image description here

enter image description here

What changes script needed to use it in field calculator?

I calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

enter image description here

In field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

enter image description here

enter image description here

What changes script needed to use it in field calculator?

Source Link
Jannik
  • 173
  • 3
  • 11

How calculate sequential values based on group field?

I calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python Expression: autoIncrement() Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

enter image description here