What we’re trying to accomplish is:
- Create an editable list.
- The list should contain a Picker control for looking up parts from our datasource.
- Upon resolving a part, a number of other related fields should be populated.
- The user should be able to provide a quantity for each part.
- Upon completion of editing the list, only the relevant pieces of information should be stored to the SmartBox (PART_KEY and the user provided Quantity).
- The other fields (including part number and description) should not be stored to the SmartBox.
- Upon re-entering the form, the list should repopulate with the saved rows and all associated lookup data.
I have most of this functionality working: requirements 1 through 6 are all implemented and working fine.
However, we cannot get requirement 7 to work. By using a editable list view the "list displays" take forever to pulll back data.
We attempted a debug message prints the values from both the Table itself and the Add/Edit row:
We’re putting the data into all three sets of fields, only the Add/Edit row (and the not-shown Display Row field, it was tested previously) fields actually contain the data.
I have a feeling that the list only displays the values that are in the smartbox object, which is why they aren’t showing up in the list. But, I also have no idea how to get them into that record since what we’re doing should be doing it.
When the user hits Edit on the row it resolves perfectly using the read method on the object for the row at great speed. We were able to publish this for each row to a message box however not to the row on the list.
There are obviously work-arounds for this:
- We could store the other data in the SmartBox. This would be a waste of space and isn’t really the “right” way to do it.
- We could make a composite SmartObject in K2 studio that looks up all information across the different database servers. I tested this and was able to get it to work, however, the composite SmartObject is “dumb” and doesn’t optimize its join. It just pulls back every row from SmartBox table and every row in the Data Warehouse PARTS table and joins them in-memory. This is obscenely slow.
Either way, we’d like to do this the “right” way, but are unsure how to continue. From our perspective, the “right” way is to only store the relevant information and just lookup the rest on-demand, so we would like to continue down that route instead of using a work-around if possible.
Let me know what you think and what options we have.