Topic
  • 1 reply
  • Latest Post - ‏2013-06-12T21:58:00Z by svrr_wtx
RPotteti
RPotteti
10 Posts

Pinned topic Lookup and filter

‏2013-05-30T20:06:43Z |

I need to mix loops in two diferent input cards in an only output. The two source messages is having below structure:

<ArticleMessage>
    <ArticleList>
        <Article>
            <ArticleID>1</ArticleID>
            <ArticleID>2</ArticleID>
            <ArticleID>3</ArticleID>
            <ArticleID>4</ArticleID>
        <Article>
    <ArticleList>
<ArticleMessage>

<ItemExclusionList>
    <ItemNo>2</ItemNo>
    <ItemNo>3</ItemNo>
</ItemExclusionList>

Output -

<ArticleMessage>
    <ArticleList>
        <Article>
            <ArticleID>1</ArticleID>
            <ArticleID>4</ArticleID>
        <Article>
    <ArticleList>
<ArticleMessage>

I need to filter out the ArticleID's that are matching with ItemNo and return the rest of ArticleID's as shown in output.

I used functional map as F_ItemList(Extract(Article:Input, ArticleID:Article:Input != ItemNo:ItemExclusionList:Input)) it is returning all Article ID's.

Please let me know how to achieve this.

Thanks,

Raj

 

  • svrr_wtx
    svrr_wtx
    4 Posts

    Re: Lookup and filter

    ‏2013-06-12T21:58:00Z  

    Look at your typetree, if Article:Input is a group, then group will disply out. you have to check each item and extract that item when not match.

    <ArticleMessage>
        <ArticleList>
            <Article>
             F_ItemList(Extract(ArticleID:Article:Input, ArticleID:Article:Input != ItemNo:ItemExclusionList:Input))

           <Article>
        <ArticleList>
    <ArticleMessage>