Sequencial numbers (char type format 0000)

Hello everyone,

My app consists in document creations, so I have a field that asks the document number. Actually I fill this field manually but it’s very inefficient and opens any ways to make errors.
So I wanna make a logic that a can “+1” in the number and the field can’t be editable (the field is in a forms).

OBS.: The field is in a char format because number format doesn’t worked. It should display in the format “0000” (example: 0001, 0103, 1511…)

Someone can help me please?

you can do that by manipulating an arbitrary text, so you first calculate the actual document (number) then use it to create the char-number by dividing the number/10000 then splitting the resulting decimal by (.) and using the last item. Here you go.

2 Likes

Niace! I never thought to do that.

1 Like

Wow, you are a genious. Thanks so much. It worked!!

2 Likes

aw thanks :smiley: glad it worked.

1 Like