AnsweredAssumed Answered

Creation of relationship via portal

Question asked by deathrobot on Jan 14, 2015
Latest reply on Jan 17, 2015 by philmodjunk

Title

Creation of relationship via portal

Post

I have a table called Documents. Each document can be related to one or more other tables (Companies, Projects, People, etc.). I set up a join table called DocumentsAssigned. It has an id field for the document (id_document), plus id’s for the various other tables (id_companies, id_projects, id_people, etc.) Each record in the DocumentsAssigned table has a value for id_document, plus a value for ONE of the other id fields (e.g. if one document is assigned to a person AND a company, there will be two records in the join table).

On a layout in the Documents table, there are portals for each of the related types (Companies, Projects, etc.) I want to script the creation of a relationship for the current document like so (for this example I’m trying to add a relationship to a person); 1) click on a “+” button, 2) have a new record created in the join table a show in the portal, 3) have a dropdown menu of people to choose from, 4) click on the person’s name to select. However, I’m coming across the following dilemma; if the portal points to the join table, ALL related records show up in the portal, not just people. If the portal points to the People table two jumps away, creating a new record doesn’t show up since there is not yet any value in the id_people field in the join table.

Hoping this all makes sense and there is a way to make this work. Thanks for any advice.

Outcomes