Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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

Posted

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?

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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

Posted (edited)

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

This topic is 5211 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.