Regarding Stream serve version 5.6.2 [ST]


In Storyteller, we have lines in Block_Lines/Block_Line
Requirement is to suppress duplicate item if exits

I have added a logic to identify the duplicate item and push a value in variables and in line repeater have added condition in XPath

It does not work

Any suggestion how to fix it.


  • stig_2018
    edited June 24 #2


    if you want to skip duplicate lines, why do you add 'linenumber' as part of the 'array-search-string'?

    wouldn't then all lines be unique… ;-)

    and maybe also use the function: FindStringExactInArray()

  • dba01
    dba01 E Member

    For list of lines with unique ItemNumber, did you try pure XPath? Something like

    Block_Lines/Block_Line[not(ItemNumber = preceding-sibling::Block_Line/ItemNumber)]

    Translated to human, the condition reads: select all Block_Line elements that have ItemNumber that does not match any of the previous Block _Line element’s ItemNumber.

    Elegant as it is, keep in mind that there will be performance concern if there are thousands of Block_Line elements. But that is probably the same with FindInArray in your script.

    Dave Bares
    Product Manager