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.

Problem /w/ Combo create & reset for calculated field[s]

Featured Replies

  • Newbies

Greetings,

I am running into a problem solving the business rules by the owner which I hope FM8 will solve in a clean way:

He wants every when a person creates a "job" to be comprised of:

2 digit year + 2 digit month + incremental job# that resets each 1st of a month.

Ergo for today it would be: 0605034

or 06 [yr] + 05 [mth] + [we are on job#] 034.

Yes he wants/needs the zeros as well... ....

I am running into problems doing the correct calculation formula. I can get the month/yr/date easily enough, but my chief problems are:

FM needs to know what the next number in the job sequence-- a lookup to see what value it should be at

or -- If I use serial gen for a Job ID field, I need to have it reset itself every month [say at midnight?] as he wants to start job codes at 001 each month. Trigger? Background Script?

And being multi-user environment, I need to do a bit of intelligence so that each time someone opens a job, it grabs the next sequence -- this I assume is the "creation" rather than commit checkboxes...

I figure it will be at least 3 fields;

ID, Date, and then Jobcode:

Where ID would be the 3 digit Job ID, that needs to be smart about incremental [last job] and also the day of the month [should I reset?].

Date would have the timestamp of the job being opened, and useful for the final calc field of job code which has the combination of the prior two fields.

I appreciate your help and wisdom in solving this problem,

Sincerely,

anDREW J

:

Edited by Guest

Trigger? Background Script?

No not quite, take a look at this template... it's done in fm3 or fm4 so you need to drag and drop it upon the icon of you FMPro app. to make it convert/migrate.

http://www.filemakerpros.com/Serialize_by_Category.zip

--sd

  • Author
  • Newbies

Thanks for the first bit of help! This gives me a direction for the first part --

--> But how do I accomplish the logic for the 1st of the month reset of counter?

Thanks again in advance!

--anDREW J

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.