# TIP:  Picking which table to base your form on

**URL:** <https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037>\
**Category:** Classic Servoy\
**Created:** [June 16, 2004, 5:13pm UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037 "2004-06-16T17:13:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wgknowles](https://avatars.discourse-cdn.com/v4/letter/w/ccd318/32.png) [@wgknowles](https://forum.servoy.com/u/wgknowles)\
**Post date:** [June 16, 2004, 5:13pm UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037/1 "2004-06-16T17:13:11Z")

</div>

When you are just starting off, it may not be obvious which table to base your form on. Read Carefully and this could save you alot of time and headaches!

Servoy Relationships at this time are limited to One Hop. Say your database has 3 tables. Customers, Groups, and a mapping table relating the two Customers\_Groups.

Customers - Customers\_Groups - Groups

The information that the user is acutally going to see are in the Customers and Groups table. THe mapping table is strictly functional.

If you Base your form on either Customers or Groups, then you won’t be able to access the other table. However if you base your form on the mapping table Customers\_Groups, then both tables are one hop away and you can access them both using simple relationships.

Anything more than one hop will require custom queries, using getDatasetByQuery() Once you have the returned dataset, DataSetManager functions work with the returned dataset.

Hope this helps!

Have fun!

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://forum.servoy.com/u/maarten)\
**Post date:** [June 24, 2004, 8:39am UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037/2 "2004-06-24T08:39:58Z")

</div>

> Servoy Relationships at this time are limited to One Hop. Say your database has 3 tables.

additional info…

You can reach for data that is multi level deep by “concatenating” relations.

(assume being in a form based on table A)  
relationAtoB.relationBtoC.myColumnInTableC

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [June 24, 2004, 10:23am UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037/3 "2004-06-24T10:23:24Z")

</div>

Hello Maarten,

that sounds very interesting! Can you be more specific? Is this the syntax for use in methods?

Thanks  
Patrick

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://forum.servoy.com/u/maarten)\
**Post date:** [June 24, 2004, 10:52am UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037/4 "2004-06-24T10:52:33Z")

</div>

yes the syntax is relationA.relationB.databaseColumn

Note: the data shown in a form using this technique is not editable.  
So most of the time you would display in a calc field or a label etc..

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [June 24, 2004, 11:15am UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037/5 "2004-06-24T11:15:21Z")

</div>

maarten, can you use/implement this technique on lookup fields too?  
So, that you fill in, in a property of a field: Related Value: relationa.relationb.column

That would be nice!

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://forum.servoy.com/u/maarten)\
**Post date:** [June 24, 2004, 11:32am UTC](https://forum.servoy.com/t/tip-picking-which-table-to-base-your-form-on/2037/6 "2004-06-24T11:32:35Z")

</div>

no, but you could use it in a script attached to an event.
