Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I'm wanting to be able to keep a set of records, some assigned invoice numbers and others that have no invoice numbers but I want them all in one database. What I had in mind was being able to click on a button which would enact a script to assign a unique invoice number. Since my invoices are sorted by year and look something like "0484323" with the first two digits being the last two numbers of the year. So you can create a new record and "if" you need a new invoice number, click on the button and presto chango! lol And if you don't need a new invoice number, once you create the new record you simply enter the data requested and move on.

I believe I will need to use multiple fields to do this. I'm thinking I will need a date field with an autoenter date. Then a calculation field to take only the last four digits. So when the date field displays 9/23/2004 the calculation field will only display 04. The problem is how do I combine this with a serial number which is only applied to records selected by the user? I hope this makes sense.

Any ideas?

Posted

Your solution does a fine job of assigning Invoice numbers but it does not check to be sure that they are unique. It sounds like you may have a smattering of pre-existing numbers. How will you be sure that the same number isn't used twice? grin.gif

Posted

Ahhhh..........Finally someone to bring me off the edge of this cliff! I guess that never occured to me, lol.......a simple matter of making of making the invoice number unique. Thanks for the reply!

Posted

First off, I wouldn't say it was a stupid question at all. Good question actually. The dumb ones are the ones nobody asks (IMHO).

Just an thought here, maybe you could put the numbered invoices in another table - temp table, then when you create a new invoice number in your 'real' table, do a lookup to see if it exists in that table already. If you have a really large number of these already number invoices this might not be feasible, don't know.

Another thought is if you set the tables field to generate new records after the ones you have already populated then. When you create a field you can set it to generate a serial number automatically. You can also use a calculation too. So your calculation could return (the year + number + whatever) and check off unique - wouldn't that maybe help?

just a suggestion. I'm not a pro in FM - yet. <g>

hope that helps

sincerely,

J__

Posted

Hmmmmm......well, I will have to give that a try J. Your making me wonder if this isn't one of thos "KISS" (Keep It Simple Stupid) situations? I'm going to give your idea a run and see what comes up. Thanks a ton!

This topic is 7362 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
×
×
  • Create New...

Important Information

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