Forum Stats

  • 3,851,516 Users
  • 2,263,992 Discussions


How to do a replace of a string inside a group by

Fofana Member Posts: 213 Blue Ribbon

Hi All,

I have this code group by Account Name

<xsl:key name="groupByAccountName" match="invoice/accountInvoiceElements" use="accountName" />

Now the requirement, is this:

For example these Account Names

  • (Sponsor 1) Global Technology
  • (Sponsor 2) Global Technology
  • Global Technology

should be grouped together under Global Technology. In other words we need to remove the string (Sponsor 1) ...(Sponsor n) before the group by

I tried this but does not work

<xsl:key name="groupByAccountName" match="invoice/accountInvoiceElements" use="substring-after(accountName,'(Sponsor 1)'" />