If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#236 by 4xjbh
Sun Jan 15, 2006 11:03 am
I have 3 Business Objects (BO). People, Companies, Projects.

If I want to associate companies to multiple projects do I create another BO say called "ProjectContacts" with this BO Recording links between Companies and Projects and People and Projects.


Number Name Company Type
051011 Tyron Place JD Const Builder
051052 Johnson Crt JD Const Builder
053014 Spirit JHJ Archit. Builder

Then I could have a tab/form in companies which have a query to show the projects associated to the company.


#237 by aware_support
Sun Jan 15, 2006 12:31 pm
You do not have to create any extra objects. If you want to associate companies to projects just define attribute "Projects" in the Company business object of type "Project". When defining an attribute tick the "multiple allowed" checkbox to indicate that a company can be related to multiple projects. You can also immediately define a matching attribute in the "Project" object called "Company".

So a Company will be related to multiple projects through "Projects" attribute and a Project will be associated with a single company through "Company" attribute.

Similarly, if you want to associate people to projects just create "Projects" attribute in the "People" (or "Person"?) object of type "Project". Tick "multiple allowed" checkbox as well and define matching attribute in the "Project" object called "People".

Once you define the attributes Aware IM will automatically generate a user interface to allow users to associate particular projects with particular companies and particular people with particular projects. Once a user does this Aware IM will always show the right association on the forms of the corresponding objects - you do not even have to define a query.

Please also refer to the User Manual that explains references in Aware IM in detail. They are very different to other products and much easier to use as Aware IM generates a LOT of things automatically - including database tables, links between them and queries.

#238 by 4xjbh
Sun Jan 15, 2006 1:40 pm
I have this working exactly as you have outlined but in the returned data I want to show if the company is the owner, builder, client, consultant etc. Example: In an Architects office we deal with Company ABC. ABC could be the Builder for our client or ABC can be our client. If I have an attribute named Category in Company how do I make ABC a client in Project xyz and a Builder in Project LMO.

I have not worked out a way to do this without creating another BO

#239 by aware_support2
Mon Jan 16, 2006 3:05 am
Yes, you are right. You do need a separate business object to represent a relationship between two objects that, in addition to linking the objects, also has to capture some additional information. In your case it would be the role of the company on the project and the company representative.

Another approach you may consider, that does not require the additional business object, is to have a separate attribute for each role a company may have on a project. For example, on the Project object you may have attributes Builder, Client and Consultant (multiple values not allowed), all of type Company. Respectively, on the Company object you would have matching attributes ProjectsBuilt, ProjectsCommissioned and ProjectsConsulted (multiple values allowed) of type Project. Then the form for object Project will show each company in a separate cell rather than in a table with other companies. Similarly, the form for object Company will show separate tables for projects where the company was the builder, client or consultant. However, if the number of potential company roles (i.e. the category values) is more than a few, or you want to have a freedom to enter a new role at run-time rather than being constrained by the predefined category values, this approach becomes impractical.

Regardless of which approach you take, Aware IM has a very flexible query mechanism, so you will be able to run queries like show all projects where company ABC was the builder and/or company XYZ was a consultant, etc.

You may have a look at objects Loan or Reservation in the configuration of the Library sample application for an example of a link object (between objects Member and Item) with additional information.

#254 by 4xjbh
Wed Jan 25, 2006 9:52 am
OK. I am pulling my hair out trying to get this attribute to work.

I have created the BO that lists what Company is linked to Projects and what role it plays. Mutiple Companies can be related to one Project with same or different roles.

In the Company BO I have a Projects tab which has an attribute called CompanyProjects. I am trying to search the ProjectCompanies BO and display the results for the current company in the CompanyProjects attribute. ie List every project the current Company is related too.

FIND ProjectCompanies WHERE ProjectCompanies.CompanyName=Company.CompanyName


#256 by aware_support2
Wed Jan 25, 2006 11:35 am
So, your design is like this (correct me if I am wrong):

Business objects:
Company -- CompanyProject -- Project

Company.Projects (multiple) -- matching to -- CompanyProject.Company (single)
Project.Companies (multiple) -- matching to -- CompanyProject.Project (single)

If this is correct, when you create a new instance of CompanyProject in the operating mode (the browser) and select a company and a project for it, the new instance will automatically appear on both Company and Project object forms (this is similar to registering a new Loan in the Library sample application, which then automatically becomes visible on Member and Item forms). You do not even need to add any search functionality, the system does it all automatically for you. This way the table for attribute Projects on the Company form should display all projects (i.e. CompanyProject instances) for the company. If there are too many items in the list, or if you want to see only the projects where the company had a particular role, you can narrow the list down by clicking the filter button in the caption of the table and entering desired criteria.

Please note the importance of matching attributes. They are absolutely essential for the system to be able to automatically display related objects.

You will also need to add a couple (or more) shortcut attributes to object CompanyProject for display purposes. Particularly, you would need an attribute CompanyName with shortcut path set to Company.Name and an attribute ProjectName with shortcut path set to Project.Name. Then you can select attribute CompanyProject.CompanyName to be displayed on the Project form for attribute Companies. Similarly, you can select attribute ProjectName to be displayed on the Company form for attribute Projects. Please have a look at Loan object in the configuration of Library sample application for an example of shortcut attributes.

Let me know if this makes sense. There isn't really much to it once you get used to the system. It does many things automatically for you.

#267 by 4xjbh
Fri Jan 27, 2006 5:18 am
Thanks. I was changing the "Matching Attributes" to none.

I was on the train reading the user guide on the train and found the "Matching Attributes" note and the lightbulb went off over my head............then your reply was posted bringing clarity.

Your quick responses are appreciated and I am now hooked.

Who is online

Users browsing this forum: No registered users and 13 guests