locked
How would i make these sequence numbers work? RRS feed

  • Question

  • Hi everyone, i'll probably explain this really bad but i'm currently working on a project that contains a map that looks like this (I've made a simple version of my map for explanation purposes):

    and the scripting functoid calls an external assembly which then calls a stored procedure that retrieves the current sequential number, however having the map as it currently is results in something along the lines of:

    SequenceNumber: 1 RequestOrder: 231

    SequenceNumber: 2 Document: File2242.txt

    SequenceNumber: 3 RequestOrder: 453

    SequenceNumber: 4 Document: File1243.txt

    SequenceNumber: 5 Document: File343.txt

    SequenceNumber: 6 Document: File12.txt

    However i want it to work where the RequestOrder part of the message is the header and the Document part is the body of the message so there can be many Documents to 1 RequestOrder but only 1 RequestOrder to 1 document however i need the sequential number to be the same for the header and for each of the body messages that belong to it, so that the output is this:

    SequenceNumber: 1 RequestOrder: 231

    SequenceNumber: 1 Document: File2242.txt

    SequenceNumber: 2 RequestOrder: 453

    SequenceNumber: 1 Document: File1243.txt

    SequenceNumber: 2 Document: File343.txt

    SequenceNumber: 2 Document: File12.txt

    And that way i can later group the bodies and their individual headers together, is there any way i can alter my map in order to achieve this? maybe in a way that it repeats the node going to the body's sequential number over and over until the header's sequential number changes and then send the next body's sequential number?

    Sorry for the bad explanation but it is difficult to explain.

    Thanks, Kyle.


    Friday, June 2, 2017 3:42 PM

Answers

  • Hi,

    I am not sure if I got the business requirement clear, but I will surely recommend you to try your hands on custom XSLT, it will give you more flexibility in your case.


    Rachit Sikroria (Microsoft Azure MVP)

    Saturday, June 3, 2017 6:24 AM
    Moderator
  • If it's difficult to explain requirements you haven't done your analysis

    What is the requirement for Sequence Number?
    If it is within the document scope mapping tools or XSLT can give you the sequence

    Are you looking for a group by of a kind?
    The Muenchian method done in custom XLST is very well documented

    Could you please provide examples of in and out xml documents?
    It will be easier to help you

    hth /Peter

    Saturday, June 3, 2017 7:42 AM

All replies

  • Is the sequence number sequential?  Do you really need to call a Stored Procedure?

    This sounds very complicated.

    Friday, June 2, 2017 4:53 PM
    Moderator
  • Hi,

    I am not sure if I got the business requirement clear, but I will surely recommend you to try your hands on custom XSLT, it will give you more flexibility in your case.


    Rachit Sikroria (Microsoft Azure MVP)

    Saturday, June 3, 2017 6:24 AM
    Moderator
  • If it's difficult to explain requirements you haven't done your analysis

    What is the requirement for Sequence Number?
    If it is within the document scope mapping tools or XSLT can give you the sequence

    Are you looking for a group by of a kind?
    The Muenchian method done in custom XLST is very well documented

    Could you please provide examples of in and out xml documents?
    It will be easier to help you

    hth /Peter

    Saturday, June 3, 2017 7:42 AM
  • Hi John, Yes the number is sequential and i do need to call a Stored Procedure.
    Monday, June 5, 2017 1:32 PM
  • Sequential is easy.  But why do you need to call the Stored Procedure?  What exactly does it do?
    Monday, June 5, 2017 8:23 PM
    Moderator