Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I have a table which I post payment entries in.

We recieve these payments every 10th and 25th day of the month.

I have a date field that holds the date and I would like the invoice ref field to automatically create when the date is entered.

for example:

Date invoice ref

25/3/2009 MCC300

10/4/2009 MCC301

25/4/2009 MCC302

10/5/2009 MCC303

and so on

any help would be appreciated

thanks

How about a calculated field c_DateofInvRef:

Case(

IsEmpty(DateField;"";

DateField & " " & InvoiceField

)

Go to storage and set to Unstored, recalculate.

hth

  • Author

thanks for the reply - I don't think I explained myself very well.

My invoice ref must be "MCC300" when the date is 25/3/2009, "MCC301" when the date is 10/4/2009 , "MCC302" when the date is 25/4/2009

in other words it adds 1 to the invoice ref number when it is the next 10th of the month and adds 1 when it is the 25th

thanks

I still don't understand this. Why don't you simply use auto-entered serial number (with "MCC" prefix)? I see no connection between the date and the reference.

  • Author

I didn't want to use an auto enter serial number as there may be 50-100 records entered at one time and I want the invoice ref to be the same as long as they are in the same period not increment just because it's a new record.

Edited by Guest

And what should happen if a record is entered on a day other than the 10th or the 25th of a month?

  • Author

That can never happen as the date field is a calculated date of 25/current month/current year.

the type of payments that will be entered currently only occur on the 25th day of each month.

I only want to make an allowance for the 10th day just in case the situation changes - in which case I will get the date field to round up or down to the nearest 10th or 25th of the current month.

Try something like:

Let ( [

m = 12 * Year ( PaymentDate ) + Month ( PaymentDate ) ;

b = Day ( PaymentDate ) > 10

] ;

SerialIncrement ( "MCC000" ; 2 * m + b - 47923 )

)

I must make a point here though that you still should really have a true serial ID in the background. Using a date like this can be very dangerous as a users can simply change their system clocks as well as sometimes a system's clock being wrong due to computer hardware/software issues ( which I have personally seen on many of occasions ).

Just some food for thought.

  • Author

Thank you very much , that's exactly what i wanted

  • Author

fair point

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.