How to make Relationships

How to make Relationships

  

Hi everyone,

I have all this entities, and i need to create relationships, but  i don't know how.
I've already read somethings (http://www.outsystems.com/help/servicestudio/5.0/Using_Data/One_to_One_Relationships.htm ) but they weren't totally helpfull.

I tought it be be something like jst connecting the fields i wanted


For example:  the field " Cod" of the TabCaterigoria i want to connect to the field "Categoria" of the field "Cateoria" but on the table "TabRegTrad".

Thanks.


Hi Nuno.

It seems a bit vague from your description what exactly would you want to connect, and why would you not want to do it through the IDs.

Usually, if you want to establish a 1 to 1 relationship between entities - for example, with TabEmpresas and TabRegTrad - you'd create an attribute that points to the Identifier of another entity. Then, when you want to retrieve the data, you specify the two entities in the query, and a condition stating that you want to retrieve the entities that are connected by that field. You need to say that the attribute "CodEmpresa" is of the type TabEmpresas Identifier.

If you want a 1 to many relationship, that can be done by a third entity, whose attributes are the Ids of the entities to be connected...

If this doesn't help, it might help to let us know of a specific example you're trying to connect, so that we can help you better.

[Edit] I see you edited your post with more details. What you need to do what you want, is to make the "Categoria" field be of type "TabCategoria Identifier".

Regards,

Paulo Tavares

I think i got it!

The field "Categoria" on the table "TabRegTrad"  i made the data type "TabCategoria identifier".

I Think it's this, right?
Right! :)

Keep the questions coming, and good luck with it ;)

Regards,

Paulo Tavares

hi Paulo,

i changed my initial post, giving a real example of a connection i wanted.

But i think i got it now.

I think what i have to do is this:


The field "Categoria" on the table "TabRegTrad"  i made the data type "TabCategoria identifier".

I Think it's this, right?
Hi Nuno.

Yes, that's it!

Keep all your questions coming, so that we can help you.

Regards,

Paulo Tavares
Thank vou very much for the quick reply.

Take care.

Nuno