on 09-11-2014 12:06 PM
Hi,
I have a requirement wherein there are 2 BOs, and the first BO has a 1:n association to the other BO. On the UI, I want to show fields from both the BOs in ONE row, but after resolving 1 particular instance.
For eg: If the 2nd BO has 3 records, and only one of them is valid for the period I login, I should pick up only that record and show its fields along with other fields of the first BO.
BO1 BO2
ID, Desc, Type ID, BO1 ID, Current valid Indicator Amount
01 Test1 A 1, 01, True, 1000
2, 01, False, 2000
3, 01, False, 3000
UI:
ID Desc Type ID Amount
01 Test1 A 1 1000
Although there are 3 records for the ID 01 of the BO1 via association to BO2, I should pick up only the first record to show on the UI. How should one resolve a 1:n association in UI designer ?
Kind Regards
Vinita
Hi Vinita,
The way I would do this, is:
in the UI-Designer
1. create a sub-list in the data model to model the 1:n cardinality
2. Bind it to the BO that has n instances
3. use an event handler and ruby script to set the lead selection to the correct record
e.g.
lead = 2
$data.MainList.SubList.SetLeadSelectedIndex(lead)
4. bind the data fields of the sub-list to the respective UI elements in the List pane of the main list
=> the entries from the lead selection of the sub list will be shown in the main list.
Best regards,
Ludger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, Horsts approach is the better one.
However it is restriced to associations within the same BO (to subnodes of the BO is fine).
According to your description, the second BO is a different BO, so valuation associations might not be usable.
If your "other BO" are actually subnodes (or you can move them inside the parent BO), use valuations.
Since you already have a "valid indicator" in the item in question in the BO, you probably do not need aditional logic inside the BO.
Best regards,
Ludger
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.