TIP: Picking which table to base your form on

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!

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

Hello Maarten,

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

Thanks
Patrick

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..

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!

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