Jump to content
Server Maintenance This Week. ×

Adding to Database record, NOT creating new record


jakemayer

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

Recommended Posts

  • Newbies

I will try to explain this in language that we both understand. I do not get the FM lingo quite yet-

I have a very simple project management system I am tweaking. I have one layout which is Projects, and another that has Tasks.

I have figured out how to link them, so that a new task posted in a Project is showing up on the Task layout. So far so good. But when I add a task on the Task layout (and designate a project), I want it to go under the correct Project. It is instead creating a new Project, even if the name is the same (ie it creates a new project by the same name instead of adding the task to the existing project with that name).

I know there is an obvious solution that eludes me! Help me FMForum, you are my only hope!

Link to comment
Share on other sites

In a Task record, you need to specify the foreign ProjectID. You can do this by setting the Tasks::_kF_ProjectID to a popup menu that uses a value list of all ProjectIDs (and use the name of the project as the second field, show only the second). Read up on value lists and foreign keys. However, that being said, it's easier interface to simply create tasks in a portal of related tasks on the Project Form view.

Link to comment
Share on other sites

when I add a task on the Task layout (and designate a project), I want it to go under the correct Project. It is instead creating a new Project

First, in the relationship's definition, disable 'Allow creation of records...' on the side of the Projects table.

Next, to select the project to which the task belong, you must enter a value into the matchfield in the Tasks table (right now, you are entering data into the matchfield from the Projects table).

Lastly, you should use ProjectID (set to auto-enter a serial number in the Projects table) as your matchfields, instead of project name (which could be changed).

Link to comment
Share on other sites

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