Two BO:s in the same form?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Two BO:s in the same form?

Post by Rem »

How do you do if you want to se fields from two different BO in the same form.

In my case I want to make one timereport and one travelreport at once.

(I tried using shortcuts, but they became readonly)

/Rem
PEFS
Posts: 207
Joined: Mon Jun 12, 2006 11:25 pm

Post by PEFS »

Hey Rem,

Shortcuts will only display as read only on a form. You can also display them using html and tags (in the desired form, create a Blank Row, edit the row to change it to HTML and enter the tag in this section - eg. <B><<Timereport.AttributeValueSC>></B>). You do not have to make the field bold as in the example.

If you wish to edit a record on the same form, the other BO will need to be referenced to the Main BO (which would have to be done to create a shortcut anyway). The referenced object could be displayed on the main form or on a separate tab that is a part of the form, depending on what the business requirement is for the BO.

PEFS
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Thanks, but I´m not sure I understand.

With HTML, can I then enter a value? (i.e not read only). In your example what does "SC" stand for, ShortCut?

Anyhow I tried this, but it was was same, no possibility to enter data.

Why cant you just put fileds of two (or more) objects in the same form?

Another way could be to make duplicate fileds i one of the BO:s and then by rules copy the info to the other BO, but that doesn´t feel right ...

/Rem
PEFS
Posts: 207
Joined: Mon Jun 12, 2006 11:25 pm

Post by PEFS »

Hi Rem,

HTML and SC Tags are only for display and cannot be modified by a user. Technically 2 BO can only exist on the same form if one has a reference to the other. The reference object can be displayed on the same form and can have data entered by the user.

Take a look at the Library sample application and view the Member details for John Brown. You will see the main details in the upper section of the form and 2 referenced obejcts displayed below for current loans and reseverations. If you wanted to be able to enter data on the same page (without leaving the form to go to a referenced form) you can select 'allow inline editing' for the referenced object on the main form.

I hope this helps.

Best Regards,

PEFS[/img]
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

I saw the inline editing option, but can I hide fields that I don´t want to display then?

/Rem
PEFS
Posts: 207
Joined: Mon Jun 12, 2006 11:25 pm

Post by PEFS »

Definetly. You control which fields are present in the referenced object using the display method section when editing the reference. This is the form section that you will edit the sorting, filtering and operations that exist within the referenced object. I very helpful new feature is the ability to control the width of each attribute that is displayed in the referenced object.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Other than specifying attributes for online editing, you can also choose a form of the related object to be shown inside the form of the main object. If desired you can define a separate form on the related object to be used for this purpose.
Aware IM Support Team
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Aware: I looked for that possibility but I couldn´t find it, where do you start?
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

In the presentation dialog for a reference attribute select Table Of Items option, select Allow Inline Editing, in the Display Method section on the right select Use Form For Each Row option, click Details button next to it.
Aware IM Support Team
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Tanks, that seems to work.

Now to the final question (I hope). I want certain fields to have the same value as my main object. So if I for example choose a company for my main object I want the same company to become automatically assigned to this object. How do you do that and could it also be updated dynamically?

/Rem
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Rem,

If you have a timereport BO referenced to the Company BO, the Company, a shortcut could be put on timereport to show the Company name for example.

If the timereport BO is referenced to the Company BO, you don't actually have to assign the Company name to timereport. It's just there.

Is that what you are looking for?

Tom
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Well as I understand I can´t use shortcuts as I need it for input. When I fill in the fields only the fileds I type info in ends up with info. Ther others remains blank.

/Rem
PEFS
Posts: 207
Joined: Mon Jun 12, 2006 11:25 pm

Post by PEFS »

Hey Rem,

You can automatically assign values from one referenced object to another based on the state of the object. An example:

Contacts are referenced by Accounts, when a contact is modified or added, the Account # value is written to the 'AccountNumber' attribute in the contacts object.

If Contact IS NEW OR Contact WAS CHANGED Then
Contact.AccountNumber=Contact.Accounts.Number

In this way, if the object being modified (in this case Contact) will acquire the Account number that it is associated to. This is an extra step and is really not necessary since you can always determine the account by using a shortcut. Not entirely sure on what you are attempting to accomplish.

I hope this helps.

Cheers,

PEFS
Post Reply