I need some help in constructing a process/query

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Dinosrules
Posts: 5
Joined: Tue Feb 08, 2011 12:40 pm

I need some help in constructing a process/query

Post by Dinosrules »

Hi,

I have a system that is managing events. It has events, clients, participants, services (products), orders etc.

The ordering part is very similar to Ordering System from AwareIM example.
Each new order is attached to an event and to a participant trough a process.

I have created reference atribute LineItems in both Events and Participants BO's. I would like to show LineItems ordered for each Event and LineItems ordered for each Participant.

The only way I can show this is manually using the ADD button (here I have already filtered the LineItems specific for Events, respectively for Participants).

I would like the LineItems to be automatically populated - so I can see at any given time, what are the ordered items for each Event respectively for each Participant.

What would be the best approach in achieving this?
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Sounds like you are talking about a tree ???

Participant
--- Event 1
------ Line Item 1
------ Line Item 2
--- Event 2
------ Line Item 1
------ Line Item 2
Tom - V8.8 build 3137 - MySql / PostGres
Dinosrules
Posts: 5
Joined: Tue Feb 08, 2011 12:40 pm

Post by Dinosrules »

Hi tford,

No, I am not talking about a tree. I will try to make myself more clear. I will refer to the BO Participant.

I am using the LineItem displayed as Table of items inside the BO Participant as this is how I want it to be displayed. I have a complex form for Participant BO with several tabs. 1. General Information; 2. Orders; 3. Payments; 4. Ordered Items.

For example the tab no. 2 has Orders displayed as Table of items. Every time I add a new order, it will also appear in this table. In this case it is very simple because the BO Order is directly referring to BO Participant.

I want to see the LineItem in the same way. The only problem is that LineItems is not referring directly to the Participant but trough the Orders. I can see the LineItems only if I generate the Add Button, and manually add them to the Table of items.

My wish is to find a method to have the LineItems automatically added to this Table of items without having to manually add them.

I am thinking to create a process that will find the LineItems in Orders for Participant and add them to the Table of items inside the Participant BO.

Any suggestions?
bartthefish
Posts: 116
Joined: Sat Oct 25, 2008 3:16 pm

Post by bartthefish »

Perhaps you could try this. Copy the BO for your Order LineItems
Call It ParticipantLineItems for example and add it as a reference attribute to your Participant BO (Multiple Allowed)

Then if you add a rule to you BO Participant as follows

IF bo_Order WAS ADDED TO Participant THEN

FIND bo_OrderLineItem WHERE bo_OrderLineItem IN Addedbo_Order.LineItems IN BATCHES OF 1

CREATE bo_ParticipantLineItem WITH assign attributes of bo_OrderLineItem Object

Then add the reference attribute as a table in you Participant BO form.

Hope this helps.
Justin
(v7.0 Build 2144) Windows. MSSQL Server
Post Reply