Jump to content

auto serial number control by ID


 Share

This topic is 5708 days old. Please don't post here. Open a new topic instead.

Recommended Posts

i trying to make a calculation in a auto enter serial number. what i tried to solve is how to split the serial number in the auto serial that was create by different location or different district.

example..if person at district A enter the record the serial number look as A0001 then person at district B enter a new record, the field's number looks B0001 and person at district C enter a new record, the field looks C0001. When person at district A again enter at new record, the field looks A002 and so on...that means the serial number should be the same numbers at every district but with the different character infront the number. hopefully everyone can understand my english.

tq

Link to comment
Share on other sites

Do it by script:

When you create new record, first find all records for this: "A" or "B" or "C", then go to last record and increment serial number. This is one of ways, i am sure there must be many ways to do it.

Link to comment
Share on other sites

hi again

i thaught i can sleep well but i can't. i tried recreate table by copying your fields. Field District and Field ID. i still dont know why it wont run as yours. my record appears like this.

district A A0001

District A A0002

District A A0002

District A A0002

District B B0001

District B B0002

District B B0002

that's mean the auto number just running 0001 to 0002 only and not counting.

Link to comment
Share on other sites

This looks like the sorting in the relationship of District to District has not been applied.

The reason this method works is that you match district to district and then sort the related values by ID descending this make the first related record have the largest ID number and hence you can produce the next one by incrementing. I guess that in your case you have either not sorted by ID or you have sorted ascending.

Link to comment
Share on other sites

  • 1 month later...

i have to login again to ask some helps.

i used almost a month above calculation to auto serial number for different users. i realised that its do not working well in multi user enviroment.the number comes duble and tripple also. is there any way to make it works well in multiuser enviroment.

thanks

Link to comment
Share on other sites

This topic is 5708 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.