Create invoice or transaction number

Hello there,

i am trying to make a form and I am stuck in a place on how to create invoice/ transaction numbers which includes something like RM220331 or could be just a number like 220331.

thanks

Hi there, @textmeinfofree… can you provide additional information about the makeup of that number? For example, are the first two digits the current year, by any chance? Do the numbers need to be sequential? If the number includes the letters at the beginning, are the letters always the same? Without knowing more, it will be difficult to help here.

Best…
Mike

@mikeloc Oh sorry for that.

The first two letters will always remains the same.
Yes the first two digits are year. and Yes numbers need to be sequential.

Hmm, unless someone has a better way, I think what you have described is a bit tricky. Here is one way to do it that uses three fields that I am calling number prefix (text), number (number), and combined number (text).

What I have suggested above feels kind of hacky (especially subtracting 2000 from the year, but I can’t seem to truncate the extracted year), and I could definitely be missing something simple and overcomplicating this one. So, if someone has a better suggestion, I’m all ears (or eyes, as the case may be).

Hope this helps.

Best…
Mike

Actually, now that I think about it, you wouldn’t need the number prefix field, and the second step could look like this.

So, who knows, maybe it’s a bit less hacky now. :slight_smile:

I’m not very experienced with Bubble (yet) but I did find a solution which worked for me using ‘extract with Regex’. The invoice number will have preceding '0’s and go up incrementally.

Change the number of zeros to how many you want to have. I assume you can also just add your first two fixed letters and year before the dynamic incremental numbers.

Then click on ‘extract with Regex’ and enter this .{6}$

Then, to display the number to the user just show the InvoiceNumberText.

Thanks to both of you. @mikeloc @darren.james7518 Really appreciate.

But i do have difficulty in understanding how actually i need to configure in my app. Since i was working on some other part of my app. Making dashboard for admin and users. And i am trying to put status column where users cand track about the transaction details. Etc
Looking for help here as well. Thanks

I’m not sure I understand completely what you mean, user Status is a separate issue to invoice numbers right? Anyway, status you can use Option sets. Do you know how they work?

yes i did created Status in Option sets. but dont know how to pull that thing on repeating group where other more details are available… plus i dont know where my app data is getting saved in database… if you are available can we do arrangement to database and workflow @ sunday ?

i am newbie you can say :confused:

I think in order to show options in a repeating group you need to give the options a display name.

The following page should help you, scroll to step 3. Use the option set as a data source for a repeating group https://bubble.io/video-course/how-to-use-option-sets-1610554750471x681145058184921100

In any case, to locate the option you select ‘Get an option’.

Please can you help me to structure my database? i have created a form kind of thing but i dont know how to put them in database or i dont know where the data is saving if i fillup the form.

would be a great help if you can give me few mins

Sure, I know how frustrating it can be … I am not an expert, I am a sort of beginner myself but am happy to see if I can help. You can DM me with a link to your editable app so I can look?

Make it editable, then copy the URL and message me with it. If you are worried about the security of your app you can make a copy of your whole app and make the copy editable.

sent you DM

This topic was automatically closed after 70 days. New replies are no longer allowed.