Skip 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.

new record creation with automatic date creation

Featured Replies

Hey all,

This is for one of my projects. Been having trouble trying to create a script which will create a new record and automatically set the date field to be 1 day later than the previous record.

For example, say I have a record in last week dated at Feb 20. Today I want to create a record which will automatically label the date as Feb 21. And if I use the script again, it will create a new record with date of Feb 22 and so on and so forth.

Any ideas will be well appreciated. Note however that by setting the date field to auto date creation will not work.

Make a selfjoin relationship on your file that relates to all records (ie, make a calculated field Key=1, and use it as the relating field).

Then make a calculated field:

cDate = Max(Self::Date)

Then, set up your Date Field as autoenter:

Date, Autoenter Calculation = cDate+1

You need to have the cDate field as an intermediary to prevent a circular reference.

  • Author

bob,

thanks for ur help in both areas. the script to delete cuplicates work now. but i am still having trouble with this auto increment of dates function. can you explain it in a more idiot proof manner? i am a total newbie here. appreciate you help a lot. Thanks again.

Create a calculated field called Key. Click Options and where you enter the formula, just enter 1. Click OK, and then "Done"

Now, select "Define Relationships" under the file menu. Create a new relationship called "Self". In the two lists that appear in the dialog, click "Key" on both the left and right lists. Click OK and then Done.

Next, go back to Define Fields, and create a date field called "Date". Don't enter any options just yet.

Next, create a calculated field called "cDate". When you click Create, the formula dialog opens where you enter the formula value:

Max(Self::Date)

At the bottom of the formula window, set the calculation result type to date from the popup menu. Click OK.

Now, go back and select the Date field, and click Options. Under the Auto-Enter tab, click the Calculated value checkbox. A new formula window appears where you enter the following formula:

cDate+1

Click OK, OK again, and then Done.

That should do it.

  • Author

Thanks a lot BOB!!! It works GREAT!!! Appreciate it buddy! Here's a thumbs up for you, until next time.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.