Create number sequence and set values for fields in data entity import

Hi,

I have a requirement wherein I need to auto generate a field value for the first record & then set the field values for all other following records with the same value which was generated. Can anyone please help me with these 2: how to auto generate the field value ie bank statement Id & how to set the following records with the same value also which method would be the best place where in to implement this logic.