Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Relate 2 database with Projects ID


albertomichieli
 Share

Recommended Posts

I have these 2 files connect like relational

 

there is a field called protocol in the Project Tasks (PT) layout Note, that I want to link to Projects (P)

 

you can see I connect them in the view Note Layout

 

[if ask for other file do not need to open just cancel]

 

the thing I cannot do is to put more option of the protocol field or the Project name field

 

like 3 4 different

 

for example

 

a field about movie 0056 can be connect to politics 0042 or internet 0044

 

Any solution?

Link to comment
Share on other sites

Hi Alberto

 

If I understand correctly, you want to make multiple selections in the protocol field. On a mac, you can do that using command-click in a drop down menu, or shift-click if you want to select multiple items at once.

 

kjoe

Link to comment
Share on other sites

Actually, my question is more about how to have more Projects [P] conected to multiple Project Tasks [PT].

 

Now is the opposite, I want both ways

 

see attached png

Link to comment
Share on other sites

You could use a join table. see the sample (had this one lying around, it's not specific but it shows the principle. you'd have to modify the setup to fit your own solution of course, especially since you're building a multifile solution).

 

kjoe

Link to comment
Share on other sites

I see. I tried to put another field called joinID with table and link projectID and Project Task ID but then I got stuck.

 

can you help and finish up

Link to comment
Share on other sites

can you help and finish up

 

Think so. One question: are tasks created independently of projects or usually from the projects file?

 

 

 

kjoe

Link to comment
Share on other sites

Hi, here's my add-on. It feels kind of patchy what I've done. But that may be to do with my feeling uncomfortable about using separate files for projects and tasks. That is to say, I would put it in one file.

 

It is necessary to script the addition of a task from the projects file because using a join file you need to create two records not one; this can not be achieved with the "allow creation of related records" option. This does work from the tasks file, as you select an existing project (ID) from the drop down menu.

Also, the joinID itself is meaningless in relation to the actual joining up of tasks and projects. It's just good practice in my view to give any record in any table a serial number, you never know when it comes in handy.

 

All in all it seems to work.

 

btw the file is rather large. if you have downloaded it, I will remove it. Please let me know.

 

 

kjoe

 

edit: attachment removed

Link to comment
Share on other sites

I downloaded

 

I m using it but looks like it deleted all the previous records associated to the Projects.

 

Also I putting more links in the ProjectTaskJoin but nothing showing up in the Projects.

 

Do you think better do single file

Link to comment
Share on other sites

I deleted a lot of records in an attempt to make the file smaller.

I tested again, look in the layout "Kjoe-form view -tasks", you'll see a task appear in the portal if you link a project to a task in Project Tasks.

You must not use the layout ProjectTasks join for this, use the portal I put in the layout Form View in the Project Tasks file.

 

Right now I see no overwhelming reason to use separate files. I'd put them together, but it all depends on what else you're planning to do with your database and how you plan to do maintenance.

For a discussion on modular setup of databases, see here.

 

kjoe

Link to comment
Share on other sites

I see. But there is a way that in the portal you made inside Project Tasks Form View layout will show also the original Tasks not only the new linked ones?

Link to comment
Share on other sites

No, not directly. It's a different relationship. You could create a script to create a new record in the join table for each existing task.

 

go to record[first]
freeze window
loop
set field [gTempID; ProjectID]
set field [gTempTaskID; TaskID]
go to layout [ProjectsTasksJoin]
new record/request
set fiel [ProjectID;gTempID]
set field [TaskID;gTempTaskID]
go to layout [original]
go to record [next; exit after last]
end loop

 

make a backup before running a script like this.

 

 

kjoe

Link to comment
Share on other sites

I tried to perform the script but it does not appear to work

 

go to record[first]

freeze window

loop

set field [gTempID; ProjectID]

set field [gTempTaskID; TaskID]

go to layout [ProjectsTasksJoin]

new record/request

set fiel [ProjectID;gTempID]

set field [TaskID;gTempTaskID]

go to layout [original]

go to record [next; exit after last]

end loop

 

It does not show on your portal the original ProjectID

[i have more than 5000 records to import]

 

Also when Im in Projects and click on Task File... this message appear

 

This action cannot be performed because the

required table is missing.

 

How can I fix it?

Link to comment
Share on other sites

I tried to perform the script but it does not appear to work. It does not show on your portal the original ProjectID

 

You might want to add

 

go to layout [Form view (ProjectsTasksMain)]

at the beginning of the script so the script can pick up both IDs.

 

edit: and the globals must be on that layout

 

 

Also when Im in Projects and click on Task File... this message appear

 

This action cannot be performed because the

required table is missing.

 

How can I fix it?

 

You need to fix the Go To Related Records step to ProjectTasksMain

with the option "show related records only" it will create a found set of related tasks. There may be other missing links under other buttons. I did not check the whole setup.

 

 

kjoe

Link to comment
Share on other sites

The set field steps are wrong. You need to specify a a target field AND a calculated result. take a look at the post above:

in the tasks form view, you set two global fields (the target fields) to the two ID fields (the calc results).

Then in the join table, you set two ID fields to the value of the global fields.

 

hope this clears it up.

again, make a backup before performing the script

 

kjoe

Link to comment
Share on other sites

see script: FixJoin

I removed all records in all tables, reimport projects and project tasks, not using auto-enter options, then run FixJoin.

 

kjoe

 

 

ps if you get numb, do something else for a while, get your mind of things. :)

PS 2 I used the file I had already

Link to comment
Share on other sites

I have the files in Filemaker Pro 7.

 

How is better to export: Tab-Separated Text?

 

Sorry for the numbness, but having drinks here (Pimm Cup) to resist dumb clients.

Link to comment
Share on other sites

You can import directly into the empty files. Use "compare field names" button to align the correct fields target and import. It's best to do this with a clear head because with long lists of field names, mistakes are easily made.

 

kjoe

 

I'm having a bowl of yoghurt with red berries in. Angel with Grin!

Link to comment
Share on other sites

Im trying to import recordsinto Projects, when aligning does ot let me import field Project Start Date, Project Finish Date.

 

 

Any solution

Link to comment
Share on other sites

That's because they're calc fields. If you open define fields dialog you'll see that they have errors (table missing) that's because I hacked away old table occurances. You'll have to look into what these fields do and how things change now you've got a many to many setup. And then redefine them.

 

This is about what I have to offer right now.

 

kjoe

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use