Forum Stats

  • 3,758,576 Users
  • 2,251,410 Discussions
  • 7,870,248 Comments

Discussions

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

Fofana
Fofana Member Posts: 192 Red 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)'" />