It is not possible to find existing table creating relation

Questions and answers regarding general SQL and backend databases

It is not possible to find existing table creating relation

Postby cuoredisardegna » Tue Sep 05, 2017 10:59 am

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
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am

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

Postby Andrei Costescu » Tue Sep 05, 2017 1:39 pm

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".
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

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

Postby cuoredisardegna » Tue Sep 05, 2017 6:36 pm

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
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am

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

Postby cuoredisardegna » Tue Sep 05, 2017 6:41 pm

Errata Corrige
using Servoy 8 using Servoy 7.4.5
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am

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

Postby ROCLASI » Tue Sep 05, 2017 8:18 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

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

Postby cuoredisardegna » Tue Sep 05, 2017 9:05 pm

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
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 4 guests