Page 1 of 1

It is not possible to find existing table creating relation

PostPosted: Tue Sep 05, 2017 10:59 am
by cuoredisardegna
Hi to All,

could SomeOne resolve this problem?
I am working on a solution with two forms :
1.) Providers <--- data_source table providers
2.) Departments <--- data_source table departments

I'm going to create a relation providers_to_departments (from the form Providers), but it is impossible for me to see and to select the table departments.
But, if I go in the form Departments I see that the table departments does exist.

Tanks in advance.

Gianni Pinna

Re: It is not possible to find existing table creating relat

PostPosted: Tue Sep 05, 2017 1:39 pm
by Andrei Costescu
How did you try to create the relation?
It sounds to me that like you would be trying to use a relation without creating it. So show related forms without declaring an actual relation between the two tables.

So you have the two forms, each with it's own table.
If you want Servoy to know of a relation, you need to define it. So right click on the "Relation" node under your solution in the SolutionExplorer view and choose "Create relation". There you will be able to choose providers as a source table and departments as a destination table. Also specify the pairs of columns an operands that make up the relation between the two tables.

Only then will you be able to drop form "Departments" as a related tab for example on form "Providers".

Re: It is not possible to find existing table creating relat

PostPosted: Tue Sep 05, 2017 6:36 pm
by cuoredisardegna
Hi Andrei,

tank You very much for two reasons. First, for Your prompt replay. Second, for Your perfect specification in order to create a relation between two tables in Servoy on "the Relation node". I did as You teached.

But the problem I'm observing is that, on the one hand:
—The table <<depeartments>> does appear in the database node, using Pgadmin (postgresql);
—But the same table <<departments>> does not appear in the Servoy Database Servers node, using Servoy 8 for the same database_name.

From another side:
-It is possible for me, to see in the Servoy-Form Departments all the row of the table departments.

Tanks for Your intention of risolution. I'm sure You will resolve.

Humbly
Gianni Pinna

Re: It is not possible to find existing table creating relat

PostPosted: Tue Sep 05, 2017 6:41 pm
by cuoredisardegna
Errata Corrige
using Servoy 8 using Servoy 7.4.5

Re: It is not possible to find existing table creating relat

PostPosted: Tue Sep 05, 2017 8:18 pm
by ROCLASI
Hi Gianni,

Does this table have a primary key defined in PostgreSQL?
If not then Servoy will mark it as 'hidden in developer' and it shows greyed out at the bottom of your table list.

You can do 2 things then:
1) assign a primary key to this table in PgAdmin
2) tell Servoy which column is the Row Identifier (open the table editor in Servoy and select 'row_ident' in the Row Ident column).
Of course this means that this row identifier must have unique values in the whole table.

Hope this helps.

Re: It is not possible to find existing table creating relat

PostPosted: Tue Sep 05, 2017 9:05 pm
by cuoredisardegna
Hi Robert,

it is a pleasure to read You, not only becouse You know the problems in the causes so that You can find the remedies with certainty, but also for the immutable simplicity of your soul: <<Hope this helps>>.

Tank You, Robert, for Your science and Your example.

EX CORDE.

Humbly.

Gianni Pinna