cancel
Showing results for 
Search instead for 
Did you mean: 

Strategy for implementing drpdownlistbykey in header / detail relationship

Former Member
0 Kudos

Quite often I have header details relationships that I want to display. The volumes of data are typically small, so rather than make multiple trips to the database I choose to load all the data into context during the init routine. Implementing an efficient way to dispay this data and keep the header details relationship syncronized on the screen is where I am looking for suggestions.

A good example would be selecting a user from a list and displaying details of that user in a series of text views.

Currently to implement this, I load all the user detail into separate elements within a node. Simultaniously I load a value set with key information which is then used by a drop down list. A series of text views are bound to attributes in the context outside the detail node. These attributes contain the currently selected user detail information. When a user is selected from the drop down list, the select event fires, and a search is performed of all the detail node elements for that key. Once found, the user detail information is copied from the appropriate element to the corresponding 'current value' attributes.

This process seems a bit cumbersome to me. I am wondering if there are more efficient ways to manage this routine scenario. Possibly there is a way of binding the text views directly to the attributes in the detail node and switching the element that is currently displayed? I am just not aware of any way to do that.

Any suggestions would be greatly appreciated

-Sheldon

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Say you have a context node "Users", cardinality 0:N, with attributes like "Name" etc.

Use a DropDown<b>ByIndex</b> element, bind property "texts" to attribute "Name". Assign an empty action to the "onSelect" event.

Create a form for the details, bind the contained InputField, TextView, whatever to the attributes inside node "Users".

Then you can select a user from the dropdown list (which displays the user names) and the detail form automatically displays the data of the (lead-)selected context element.

Armin

Former Member
0 Kudos

Thanks Armin,

That was the definition of simplicity itself! (he said sheepishly) ...

I figured I was missing out on some built in mechanism for such a routine opperation.

Thx.

Answers (0)