# It is not possible to find existing table creating relation

**URL:** <https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404>\
**Category:** Classic Servoy\
**Created:** [September 5, 2017, 8:59am UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404 "2017-09-05T08:59:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cuoredisardegna](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/cuoredisardegna/32/4953_2.png) [@cuoredisardegna](https://forum.servoy.com/u/cuoredisardegna)\
**Post date:** [September 5, 2017, 8:59am UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404/1 "2017-09-05T08:59:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [September 5, 2017, 11:39am UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404/2 "2017-09-05T11:39:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cuoredisardegna](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/cuoredisardegna/32/4953_2.png) [@cuoredisardegna](https://forum.servoy.com/u/cuoredisardegna)\
**Post date:** [September 5, 2017, 4:36pm UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404/3 "2017-09-05T16:36:09Z")

</div>

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 \<\> does appear in the database node, using Pgadmin (postgresql);  
—But the same table \<\> 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

---

<div class="post-metadata">

**Author:** ![cuoredisardegna](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/cuoredisardegna/32/4953_2.png) [@cuoredisardegna](https://forum.servoy.com/u/cuoredisardegna)\
**Post date:** [September 5, 2017, 4:41pm UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404/4 "2017-09-05T16:41:04Z")

</div>

Errata Corrige  
using Servoy 8 using Servoy 7.4.5

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [September 5, 2017, 6:18pm UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404/5 "2017-09-05T18:18:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cuoredisardegna](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/cuoredisardegna/32/4953_2.png) [@cuoredisardegna](https://forum.servoy.com/u/cuoredisardegna)\
**Post date:** [September 5, 2017, 7:05pm UTC](https://forum.servoy.com/t/it-is-not-possible-to-find-existing-table-creating-relation/19404/6 "2017-09-05T19:05:23Z")

</div>

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

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

EX CORDE.

Humbly.

Gianni Pinna
