cancel
Showing results for 
Search instead for 
Did you mean: 

sorting pivot2/clickable URLs by the clickable value displayed and not the URL itself

bminehart
10 - ETL
10 - ETL

When I have converted a pivot table column to have clickable link functionality, I cannot sort by the clickable displayed value. Instead, sorting is done alphabetically using the URL of the link, which is non-sensical for our use case.

See example attached image. In the picture, the column has been sorted, but you can that the values displayed are not ordered properly because the rows were sorted according to the underlying URL.

Example, the underlying  value in the first row pictured is: <a href="https://url">202404605</a>. I want the table to sort by the 202404605 contained inside the HTML markup.

bminehart_0-1727210970683.png

 

3 REPLIES 3

Jake_Raz
10 - ETL
10 - ETL

How are you converting the values in that column to a clickable link? We use a script to accomplish the same thing, but we've never noticed any issues with sorting the resulting links.

Here's an example of what I mean:

Jake_Raz_0-1727270285361.png

The "Matter Name" column is normally NOT a hyperlink; it's just plain text. We convert it into a clickable URL with a widget script. The script we use is constructing the link using a hardcoded base URL and then dynamically adding the values from the "Primary Key" and "Object Type" columns. So the first row's URL would be something like "[baseURL]/TRAN_692999" while the second row would instead be "[baseURL]/DISP_939420".

As you can see, I'm sorting by the "Matter Name" column and it appears to be sorting as expected: alphabetically ascending by the actual text of the Matter Name itself. It's not sorting by the HTML code or the URL, because it if were, then that first row would've sorted to the bottom (since "[baseURL]/DISP_..." would come before "[baseURL]/TRAN_...").

AssafHanina
Sisense Team Member
Sisense Team Member

Hey @bminehart ,

from the screenshot shared, the Sorting is minimal due to Pivot Grouping level. 
in case the link is Unique: 

  1. Does the sorting works with a single column in the Pivot rows? 
  2. can the Grouping level can be removed, for example, place the Link or primary column in the first Pivot Row?
  3. Does the Hyperlink generated via the datamodel or pivot script?
    in case it's pivot script, as @Jake_Raz mentioned the sorting should work 

Grouping screenshot: 

AssafHanina_0-1727306891022.png

best regards

 

Assaf

DRay
Community Team Leader
Community Team Leader

Hello @bminehart,

I’m following up to see if the solutions offered by @AssafHanina or @Jake_Raz worked for you.

If so, please click the 'Accept as Solution' button on the appropriate post, that way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)