Issues with views - sorting using the index

Post Reply
KarenM
Posts: 14
Joined: 21 May 2018, 04:22

For the Business Capabilities, I've made use of the "Business Capability Index" field to control the order in which these items appear in the various predefined views eg Business Reference Model; Business Capability Change Footprint;

These views however seem to sort these index numbers like text instead of numbers. So, if I'm numbering 1 to 15 then the resulting order in the view is 1, 10, 11,12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9
instead of the expected 1, 2, 3, 4, 5, 6 7, 8, 9, 10, 11, 12, 13, 14, 15

Can this be corrected to numeric sorting, please?
User avatar
neil.walsh
Posts: 456
Joined: 16 Feb 2009, 13:45
Contact:

Hi Karen,

Thanks for spotting this bug. We've just done a fix on this and it will make it into the next release. If you want to manually update your own Viewer it's pretty easy to do.

Open the files core_bl_bus_cap_model.xsl and core_bl_bus_cap_2_change_footprint.xsl. Both of these are located in the folder called "business".
In each file search for the phrase "business_capability_index".
Replace the lines

Code: Select all

<xsl:sort select="own_slot_value[slot_reference = 'business_capability_index']/value" />
with

Code: Select all

<xsl:sort select="own_slot_value[slot_reference = 'business_capability_index']/value" data-type="number"/>
That's it!

Cheers

Neil
KarenM
Posts: 14
Joined: 21 May 2018, 04:22

Thanks - well fixed
Post Reply