on 03-23-2007 1:09 PM
Hi Everybody,
I have R3 data which consists of two fields namely CategoryID and CategoryName as follows:
CatID CatName
0001 AAA
0001 AAA
0001 AAA
0002 BBB
0002 BBB
0003 CCC
.
.
and So on... Now I want to take the CatID and map it to a context element for each catID a context element will be created dynamically.
eg:
I need Output as :-
CatID CatName
0001 AAA
0002 BBB
0003 CCC
How to do this...
Regards/Guru
Hi Kumara,
Try something like this
create a value node under this create two value attribute CatID and CatName and then use this code snippet
Collection data = new ArrayList();
int size = <size of your data>
for (int i = 0; i < size; i++) {
// instantiate the new context node element of type QuizData
IPublic<comp name>.I<value node name>Element Element =
wdContext.create<value node name>Element();
// set contained context value attributes
Element.setCatID(CatID value);
Element.setCatName(CatName value);
// add new context node element of the type value node to ArrayList
data.add(Element);
}
// Bind collection of context node elements to context value node
wdContext.node<value node name>().bind(data);
Do Reward points if it helps
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi KumaraGuru,
If both are same data type u can use swapping technique.
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.