Pivot2: "Clickable URL Links In Pivot Rows" Re-Implemented
Introduction
In some cases you might have a URL’s in your fields in the cube, this post will show you how to modify URLs placed in rows of a Pivot table into clickable links.
Purpose & Benefits
This will allow you to jump to either internal or external web resources for further information regarding a certain element.
Steps
STEP 1 - ADD THE PLUGIN
- Download the latest version of the plugin from this link
and extract the enclosed folder into the plugins folder:
/opt/sisense/storage/plugins/
STEP 2 - ADD A URL DIMENSTION
Create a a new pivot table and add the dimenstion that holds the URLs to be one of the pivot's dimensions
STEP 3 - CONFIGURE THE URL COLUMNS
COPY PASTE THE BELOW CONFIG SCRIPT TO THE WIDGET'S ID:
const columnsToRenderAsHTML = [3,4];
const columnsToRenderAsPlainURL = [3];
const columnsToRenderAsPlainURL = [3];
Note, you might need to add a column range for one column:
const columnsToRenderAsHTML = [1,1];
That there are two options for making your URL into a clickable link :
for HTML values (i.e. <a href='https://www.google.com' target='blank'>Google</a>) or
for normal URLS (i.e. https://www.google.com)
Depending on the type of values you have in your data, choose the correct option and set the column number you want to change, starting at 1.
Before:

After:

Notes:
- If you'd like to have these links refer the user to an external page on the Internet, simply add 'http://' before all links in the actual data. This can easily be done by creating a new custom column in the table which holds the URLs and concatenate() 'http://' to the existing URL using the concatenate('string1', 'string2') function.
- Replace the http://xxx.xxx.com/xxxx/ (just this, without touching the ' or ") with your fixed URL and the column you stated in the variable in the beginning of the code will be appended to the end of this URL.
- This plugin doesn't appear in embed mode.
Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022