tricky design question

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

tricky design question

Post by pkesch »

Hi support,

I am close to purchase awareim and the impression I got during the evaluation period is just impressive!

But there is one topic left which I could not resolve during evaluation period. Here the description:

I would like to build a company database and record addresses and related data. Now, companies can have daughter-companies and multible owners. I intended to use a reference attribute which links to companies. The problem now is, that I would like to add specific data which is related to the ownership. For example that a company owns xx% of another company or is owned for yy% by a company.

I tried to resolve this issue by relating a new object called ownership which has a reference from customers.

But in this case the related field can not be entered.

A simple relation works fine and I can show and browse the tree (just amazing :D )

How should I design this in order to be able to enter relationships with attributes?

Thanks a lot in advance!
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

I tried to resolve this issue by relating a new object called ownership which has a reference from customers.

But in this case the related field can not be entered.


Sorry, but the description of the issue is not quite clear. Could you please provide a little more explanation?

It sounds like the Ownership object is a good idea but I don't understand what you mean by "the related field cannot be entered". What do you mean by a related field and why cannot it be entered?
Aware IM Support Team
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

As you mentioned, a simple link between two companies will not work because you need to register somewhere the specific data related to the link, like the ownership percentage. You can do it by adding object Ownership with the following attributes:

- Name: Owner, type: Company, multiples not allowed.
- Name: Owned, type: Company, multiples not allowed.
- Name: Share, type: number.

This design is very similar to the Member - Loan - Item design demonstrated in the Library sample application, where Loan is a link between Member and Item that holds specific data like Loan Date, Due Date, Renewal Count, etc.

Just like with the Library application (where a member can have several loans) you would want to allow a company to have multiple linked Ownership instances so that you can register multiple owners of company.

Please note the use of matching attributes between objects in the Member - Loan - Item design. You would want to replicate that in your Company - Ownership - Company design.
Aware IM Support Team
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

sorry but I still don't get it.... it seems to be a missunderstanding from my side...

here is what I did:

I create a BO company with only two attributes:
name text
street text

BO relation:
percentage number

next I add the references:
add reference in BO company:
"owns" reference to "relation", multible allowed (as they can have more relations)
owner of relation (as it should not stay alone)
create attribute in relation "owns"

the same i did with attribute "owner"

the references are created accordingly in BO "relation"

Now, if I go to testing mode I can see the following for BO company:

attribute: name
attribute: street
attribute: owns
attribute: owner

I can enter text in name or street but there is no possibility to enter anything in the relations! I see in the browser the name of the relation but no buttons to add anything. Instead there is a text written "None"
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

You need to allow editing of reference attributes. This can be done by clicking Presentation button on the attribute dialog for attributes Owns and Owner, and then checking the "Generate Add Item button" box. Next time you run the application you should see a little icon next to "None" to select a company for the Relation object.
Aware IM Support Team
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

WOW... thanks a lot.... it works....

I never thought that I should allow this option manually...

Again, thanks for quick support:-)
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

New question...

Post by pkesch »

Hi Support,

Now it works and the relation is shown correct.
Unfortunately, only the field "percentage" is shown... which is not quite sufficient in the "company" BO.

So, only attributes which belong directly to a referenced BO are shown in the Table view of a reference. No attributes of a related object can be shown.

I know that it is possible to design a own presentation and show nested objects.

But would it also be possible to show this related attributes via a new field in "relation" which is updated via a rule when a new object is created or there has neen any change??

I tried this but I am not so familiar with writing rules.

Could you please give me an example how to do this (if it is possible, of course)

Best regards,
Peter
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Hi Peter,

You can show attributes of related object without having to add any rules. You need to add an attribute of type Shortcut. For example if you want to show company name when showing a list of employees of the company, you can do it by adding attribute CompanyName to object Employee with path set to Company.Name.

Please refer to the Aware IM User Guide for more details on shortcut attributes.
Aware IM Support Team
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

Thank you very much :-)
Post Reply