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.

Restart Serial Number

Featured Replies

I have a Project Number which is currently set as a serial number.

I have a Task Number which needs to increase by one until the Project Number changes.

Example:

Project Number - Task Number

7100 - 1

7100 - 2

7101 - 1

7101 - 2

7101 - 3

7102 - 1

thanks,

Jim

Not sure I understand. Do you have two tables, Projects and Tasks (and maybe a join table btw them)?

Can you tell us why you need this? Is this a sort order?

  • Author

I have Project Table and Task Table that are related as Project::)__KP_ProjectID to Task::__kf_ProjectID.

Each project has a unique serial number as project number.

I need to show a Task Count number for each project. So when project number changes my thought was to have Task Count number start over at one.

Jim

Can a Task be associated with more than one project?

What is a Task Count number? Is it simply a numbered list of tasks? That can be done with the @@ symbol on a layout.

  • Author

A Task can only be associated with one project.

By Task Count I mean Task Number. Another words if the Task Number is 3, then it is the third task under that project.

Does that help explain what I am looking for?

Jim

I would store the highest project number. When a new project/task pair is being created, for either existing or new project (I assume you already have a way to create a new project and increment the project number), compare the newly created project number to the stored number. If the newly created project number is greater than the stored number; increment the stored number by 1, and set the project's task number to 1. If the newly created project number is less than or equal to the stored number (you may be adding a task to a previous project); just increment that project's task number by one and leave the stored value alone.

There are many ways for your technique to fail, least of which is record lock with multi-user access and deletion of projects.

I wouldn't go this route. Let the key field for tasks be a meaningless auto-enter serial number.

In the portal of tasks on the project form, simply add a sort order field.

This demo from "comment" shows how to elegantly arrange rows in a portal.

http://fmforums.com/forum/showpost.php?post/294075/

Edited by Guest

  • Author

That is very clean, thanks for sharing.

Jim

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.