IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  double distinct-values?

    Posted 06/08/07 12:41 PM

    Hi, I´m a beginner in Tamino and i need some help…

    I have a document like

    44 01 0001 more info 44 01 0001 more info 44 06 0001 more info 67 03 0001 more info

    …etc

    and i know how can i get the total number or records of each code:

    for $rec in distinct-values( input()/record)
    let $node := ( input()/record[state=‘0001’ and code=$rec] )
    return { $count(node) }

    but, how can i display the total number of records of each code/subcode?

    Thanks.


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: double distinct-values?

    Posted 06/11/07 11:42 AM

    Try

    
    let $codes:=distinct-values(for $rec in ( input()//record) return string-join(($rec/code, $rec/subcode),","))
    for $c in $codes
    let $code:=substring-before($c,",") 
    let $subcode := substring-after($c,",")
    let $nodes:=input()//record[state='0001' and code=$code and subcode=$subcode] 
    return <node code="{$code}" subcode="{$subcode}">{ count($nodes) }</node>
    

    Regards

    Harald


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: double distinct-values?

    Posted 06/11/07 01:06 PM

    It´s exactly what i need, and i obtain a quick response!

    Thanks a lot, i would never find it.


    #Tamino
    #API-Management
    #webMethods


  • 4.  RE: double distinct-values?

    Posted 06/11/07 09:57 PM