|
Home > Archive > BizTalk Server General > December 2004 > Cumulative Sum - lookup functoid output - group by keyfield
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Cumulative Sum - lookup functoid output - group by keyfield
|
|
|
| Is it possible to do this one using the XSLT? Or do i
need to go for custom functoid?
Can I expect some clue on this?
Thanks,
>-----Original Message-----
>Cumulative Sum - functoid output - group by keyfield in
>xml input
>
>Need Help!
>
>Input Schema:
>
>DocNumber
>prodId
>Qty
>Others
>
>Input Schema Sample data:
>
>doc1 p1 1 o1
>doc1 p2 2 o1
>doc2 p3 3 o2
>
>Output Schema:
>
>DocNumber
>ProductNumber
>Qty
>Others
>Price
>PriceExtend
>Total
>
>
>Price in the targe schema is fetched from Database using
>database lookup/value extractor functoids passing the
>ProdId as a
>
>input parameter
>PriceExtend = Qty * Price
>Total = sum(docNumber) group by DocNumber
>
>Output Schema Sample data:
>
>ex.
>Lets say price for the products p1,p2 are 10 and 20
>respectively
>The result should be:
>Doc prod Qty Others Price Price Total
>Number Id Extend
> ========================================
==========
>doc1 p1 1 o1 10 10 50
>doc1 p2 2 o1 20 40 50
>doc2 p3 3 o2 30 90 90
>
>Using XSLT, we can sum up the values based on a key field
>(ie. Sum(Qty) group by DocNumber or ProdId) as, if the
>values are from input XML file. Thanks forall who have
>helped me.
>
>But now, the value which i wanted to sum is output of a
>functoid (what it does:Qty from XML * Price from
Database
>lookup) but
>
>still based on a key field in a input XML document.
>
>So, the expected one is : SUM(Qty from XML input * Price
>from Database lookup) Group by Keyfield in XML input
>
>Am finding difficulty in populating the Total field of
>the output schema.
>
>Want to give a try: pl use the URL for schema and map
>http://ragavind.topcities.com/Bizta...unctoidOutputsO
n
>AKey.zip
>
>Thanks in Advance.
>
>.
>
| |
| Tan Bao Nguyen 2004-12-07, 5:49 pm |
| Ragav,
The cumulative sum functoid doesn't handle grouping by keyfield. My
suggestion is to go with a custom functoid or an external assembly (called
from the scripting functoid).
Regards,
Tan Nguyen
Microsoft BizTalk Server
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------[vbcol=seagreen]
| |
|
| Thanks Tan Nguyen.
If all the data which are to be manipulated are available
in input XML, I could very much able to get the required
output.
Here the scenario is, I have data in XML and apart from
that am fetching a value of each element in XML from a
database (using a database lookup). So, with these
values , now i need to construct the output XML.
Any persistant/inmemory XML with XSLT will help in this
case? Any insight will help.
Appriciate your help!
Thanks,
-Ragav
>-----Original Message-----
>Ragav,
>
>The cumulative sum functoid doesn't handle grouping by
keyfield. My
>suggestion is to go with a custom functoid or an
external assembly (called
>from the scripting functoid).
>
>Regards,
>Tan Nguyen
>Microsoft BizTalk Server
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>--------------------
group by keyfield[vbcol=seagreen]
V5.50.4910.0300[vbcol=seagreen]
microsoft.public.biztalk.general:22082[vbcol=seagreen]
in[vbcol=seagreen]
using[vbcol=seagreen]
field[vbcol=seagreen]
the[vbcol=seagreen]
have[vbcol=seagreen]
a[vbcol=seagreen]
Price[vbcol=seagreen]
of[vbcol=seagreen]
map[vbcol=seagreen]
tsO[vbcol=seagreen]
>
>.
>
| |
| Tan Bao Nguyen 2004-12-21, 5:51 pm |
| Could provide more details on the mapping you need to do (example of source
schema and expected output)?
Regards,
Tan Nguyen
Microsoft BizTalk Server
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------[vbcol=seagreen]
<1a7d01c4d73c$3fd54e90$a501280a@phx.gbl>
<SwPtMgJ3EHA.3512@cpmsftngxa10.phx.gbl>[vbcol=seagreen]
| |
|
|
In my very first post on this topic i have given the
input and expected output etc. Am I missing something?
The input, output schema and map files could be
downloaded from the following url:
http://ragavind.topcities.com/Bizta...nctoidOutputsOn
AKey.zip
Thanks Tan Nguyen.
-Ragav
>-----Original Message-----
>Could provide more details on the mapping you need to do
(example of source
>schema and expected output)?
>
>Regards,
>Tan Nguyen
>Microsoft BizTalk Server
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>--------------------
><1a7d01c4d73c$3fd54e90$a501280a@phx.gbl>
><SwPtMgJ3EHA.3512@cpmsftngxa10.phx.gbl>
group by keyfield[vbcol=seagreen]
V5.50.4910.0300[vbcol=seagreen]
microsoft.public.biztalk.general:22513[vbcol=seagreen]
available[vbcol=seagreen]
required[vbcol=seagreen]
from[vbcol=seagreen]
this[vbcol=seagreen]
by[vbcol=seagreen]
and[vbcol=seagreen]
<anonymous@discussions.microsoft.com>[vbcol=seagreen]
$a601280a@phx.gbl>[vbcol=seagreen]
i[vbcol=seagreen]
keyfield[vbcol=seagreen]
the[vbcol=seagreen]
20[vbcol=seagreen]
key[vbcol=seagreen]
of[vbcol=seagreen]
input[vbcol=seagreen]
field[vbcol=seagreen]
tpu[vbcol=seagreen]
>
>.
>
|
|
|
|
|