Simplicty and flexibility!


OpenRelated() - Do relationships have name?


Started by Patrick
Search
You will need to Sign In to be able to add or comment on the forum!

OpenRelated() - Do relationships have name?

I’m having a problem understanding the action on a form (see attached). The action is Form Open Related and the parameters are rClientChq, ClientSelectFrm. What is the rClientChq? It’s not in forms, Procedures or Databases. The dialogue says Parameters: [Optional] Enter RELATION[,From or Report]:

Is it a relationship? Do relationships have name? 


Written by Patrick 29/09/16 at 16:51:39 Dataease [{8}]FIVE

Re:OpenRelated() - Do relationships have name?

Hi Patrick.


0Yes. Relationships have names ;-)

DataEase is a little back to front.

The default way of doing things in DataEase is really the way you should never do it ;-)

Like suggesting a column name with a lot of extended characters, spaces etc… It is quite nice for readability there and then, but it is doomed to cause one problems later down the line ;-)

Same with relationships. DataEase default to the relationship name being the table (or most people would think it is the form name) when in reality it is just a name.

In the relationship form you have Alternative (Unique relationship) name.


If you fill this in this is the name of the relationship.

One should really use them all the time so not to confuse things for instance in DQL.

When you do

For Orders ;
any Orderline with Name=”test*” .

you don’t start from scratch.

If there is already a relationship between Order and Orderline on ex. Ordernumber then filter will be

For Orders ;
any orderline with ordernumber = orders ordernumber and name=”test*” .

This is why sometimes you don’t get all the records you expect to get.

So if the relationship in the relationship table had used a unique name like rlOrderLines

Then you would not have gotten this “confusion” in the DQL.

So open related arguments are:

RELATIONSHIPNAME (i.e. not table or form, but relationship), DOCUMENTNAME (not form, table etc. but Document).

So you can use any relationship as long as it exists and you can then open any document that is based on that relationship.

So you can use OpenRelated to open a related Report and hence use it for filtering that report… (not much used, but a brilliant feature).


Written by DataEase 29/09/16 at 16:53:15 Dataease [{8}]FIVE
DG3_ForumList