Post your feature requests and suggestions on our forum Groups
Cont_bg


How to create relationships between database forms online

Creation of relationships between database forms in MyTaskHelper is easy.


To create relationship you don't need to use any additional fields or a code. Use simple drag-and-drop functionality.

Please view relationship demo

 

See step-by-step instructions below

 

Assume we have two database forms: Team and Player. We will add football teams to the first database Team, football players - to Players. Remember that linking fields in forms is possible only if you have at least two forms. 


1) Go to the Forms menu and create two forms with the following fields: Name, City, Ranking (for the form Team) and Name, Number for the form Player.

 

Database form Player 

 

Database form Team 

 

2) Then click on button Relationships. On the new page you can start to create links between the forms. Select the needed web form, and then select the relationship type (has many, has and belongs to many, belongs to, has one) and select the linking column. In this example we will consider the following types: Belongs to (many to 1 or 1 to 1), Has and belongs to many (many to many), has one (1 to 1), has many (1 to many).

Relationship types

Relationship type: Belongs to

 

Select relationship type:   belongs to for the form Player in the Forms menu. Also you need to select a relationship column (in this case it's Name).  Many players belong to one team. Adding a new player, you can select for  it only one team that is listed in the second form Team. The field with the team names will be represented by a dropdown list with only one element to choose.


Relationship type belongs to 
 
When you add a new record you can select only one needed team.



submit new record to the database

 

To see records about only one team in the table you need to select an item in the dropdown list. See the screenshot

 

How to see records from only one team

Relationship type: Has and belongs to many

 

Using this relationship type you can select several players for one team (when you submit form Team) and can select few teams submiting the form Players.

 

Has and belongs to many

 

 

Form Team. We can see all columns in the spreadsheet  plus one additional column Select Player (all entries are in the table as links).


 

Relationships in MyTaskHelper

 

 

When you add a new record to the form Player you can select all needed teams from another table.

 

 

Relationship type many to many

 

 

When you add a new record to the form Team you can select all players you need from another table.

 

Many to many relationship type

 

Relationship type: Has one

 

For this case we have created a new form Coach with two fields (Name and Salary). One team has one coach and for one coach we can select only one team.

 

So, select needed forms, relationship type and linking column (this column from the form Team will be shown on the spreadsheet Coach). In this example we will link the form Coach with the form Team using a  linking column Name.

 

Relationship type has one

 

 

For this form (Coach) you can select only one team.

 

 

How to submit form using relationship

 

 

 

You can see how the spreadsheet  Coach looks like.  In the spreadsheet new column Select Team has appeared.


Form coach (relationships)

 

 

 

You can see how the spreadsheet Team looks like.  In the spreadsheet  two new columns Select Player, Select Coach have appeared.


Additional column

01.09.2010 Igor Petrushenko


Please, login to MyTaskHelper to be able to post comments
Bookmark!

Hi Igor,

Is is possible to have relationships filter options on a form. For instance, can I create a relationship form that filters players by teams — if I select FC Dyanamo as the team I will only see FC Dyanamo players when I click on the Players dropdown? Or if I select Bayern Munchen I will only see Bayern Munchen players.

31.01.2012

Hi Russell!

You mean, if you have two related forms Teams and Players, you want to create third form, which will work like Field Rules (dynamic web-form)?

If so, it sounds very interesting, but not yet possible to do.

31.01.2012