I’ve got got this DataView that is using XSL. One columns is a link. The field I’m using as query string key {@Title} needs to be changed for the link.
- Its currently 9 digits and I need to drop the first digit.
- The remaining 8 numbers need to be muliplied by 8
so N00000010 turns into 00000080
the below code is just outputing
https://myserver.edu/zzz/r.aspx?key=N00000010
but should be
https://myserver.edu/zzz/r.aspx?key=00000080
UPDATE: If overflow, output can me more that 8 digits if need be and actually, this is acceptable and even preferable.
https://myserver.edu/zzz/r.aspx?key=80
<td class="ms-vb">
<xsl:value-of select="@Supervisor" /></td><td class="ms-vb">
<xsl:value-of select="format-number(@StartingSickBalance, '#,##0.00;-#,##0.00')" /></td><td class="ms-vb">
<xsl:value-of select="format-number(@FiscalStartingBalance, '#,##0.00;-#,##0.00')" /></td><td class="ms-vb">
<a href="https://myserver.edu/zzz/r.aspx?key={@Title}">See Balances</a>
</td><td class="ms-vb">
I came to a very similar solution as dash, only I have used format-number() with the format specifier ‘0’ instead of concat().
It worked for me in VS2010.