on 11-28-2013 9:16 AM
Hi All,
How can i sort the below structure using message mapping.
I have a structure similar to the one given below:
<Recordset>
<Item1>
<Forcast1>
<Forcast2>
<Forcast3>
<Forcast4>
<Item1>
<Item2>
<Forcast1>
<Forcast2>
<Forcast3>
<Forcast4>
<Item2>
<Item3>
<Forcast1>
<Forcast2>
<Forcast3>
<Forcast4>
<Item3>
<Item4>
<Forcast1>
<Forcast2>
<Forcast3>
<Forcast4>
<Item4>
<Item5>
<Forcast1>
<Forcast2>
<Forcast3>
<Forcast4>
<Item5>
</Recordset>
I need to sort these Items on basis of Forcast2 values using Message Mapping. For ex Forcast2 have these values(10,6,12,1,6) respectively. Then output should be:
<Recordset>
<Item4></Item4>
<Item2></Item2>
<Item5></Item5>
<Item1></Item1>
<Item3></Item3>
<Recordset>
Hello,
Try this:
Forcast2** -> sort (in ascending order) -> Item (target node)
Forcast2** -> sort (in ascending order) -> SplitByValue(EachValue)-> Forcast2
For rest of the fields:
Forcast2** ->
--------> SortByKey (ascending) --SplitByValue(EachValue)-> Forcast1
Forcast1**
and so on....
** -> Change field's context and set it to Recordset level
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
As per my understanding of the answer:
1. Change the context of Forecast2 to Recordset. Sort this F2 and map to Item in Target.
2. Change the context of Forecast2 to Recordset. Sort this F2 use SplitByValue and map to F2.
3. Change the context of Forecast2 and the mapping field to Recordset. Use SortByKey function as F2 as Argument1 then SpiltByValue. Map to the field.
Hello,
1) Yes
2) Yes
3) Change context of Forecast2 and the mapping field (for instance Forecast1) to Recordset then use SortByKey function (Forecast2 as Argument1 and other field (in this case Forecast1) as argument 2) then use SpiltByValue and eventually map output to the target field (Forecast1).
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.