Construct List-View Containing data from multiple smart objects.


Hi.

I'm new to K2 and have been tasked with building a wire-frame for a health care ordering portal. My plan is to define three SmartBox SmartObjects, Patient, Doctor and Test. These would each be 1-1 children of the parent Advanced SmartBox SmartObject called eOrder.

I've been able to link the SmartObjects via the GUID of each child SmartObject in the Parent SmartObject and have a form that allows me to create eOrders.

What I am trying to do now is create a list-view based on the parent smart-object that displays values from each of the child SmartObjects. So containing fields similar to the following:

 

OrderNo | Patient.Name | Patient.DOB | Clinician.Name | Test.Name|

 

as an example. I've managed to add LoadPatient/Clinician/Test methods to the eOrder SmartObject and can display a single field value from the child SmartObjects in the Parent SmartObject List View but I am unable to display more than one field from the child Object in the Parent Objects List View. 

 

I'm trying to take a modular approach and have set my smartobjects up in the following manner:

 

---------------------     --------------

| eOrder            |     | Patient    |

|                   |-----|            |

| PatientID: GUID   |     | Name: Text |

| ClinicianID: GUID |     | DoB:  Date |

| TestID: GUID      |     | ...        |

---------------------     --------------

     |          |______________

     |                        |

-------------------     -------------------

| Clinician       |     | Test            |

|                 |     |                 |

| Name: Text      |     | Name: Text      |

| Provider#: Text |     | Collector: Text |

| ...             |     | ...             |    

-------------------     -------------------

I'd appreciate feedback on whether this approach is possible. The intention is to use SmartBox objects in the initial discovery phase. It would be great to avoid a monolithic structure that has all the information fields for everything as this will be cumbersome and unwieldy to work with.

 

I understand that what I am trying to achieve using this structure may not be possible in K2. It would be great to learn whether I am completely missing the point and if this approach is doomed, what an alternative approach may involve.

 

Thanks for your time.

Steve.


3 replies

Badge +1
Hello,

you need to build a composite SMO its possible to do .
Badge +1
Hello,

Take this example. Its bit old but same approach you can do in k2 designers now

https://www.rightpoint.com/thought/articles/2012/09/14/build-a-composite-smartobject-in-15-minutes-or-less

Thanks for the information. The link was valuable because it forced me to consider the functional difference between a composite SmartObject and SmartObject associations.


 


After some experimenting I've decided to forge ahead using SmartBox SmartObjects with the 1-1 Parent:Child relationship set out as above. To create the list view, I will duplicate the values required from each child SmartObject in the parent SmartObject when each child is created so they are simply available from the parent. For now I think this is an effective solution to my problem of building a wire-frame.


 


Regards,


-Steve

Reply