cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member

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];

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:
  1. 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.
  2. 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.
  3. This plugin doesn't appear in embed mode.
Rate this article:
Comments
Laflet
9 - Travel Pro
9 - Travel Pro

What’s the advantage of this method compared with: https://community.sisense.com/t5/knowledge/clickable-url-links-in-pivot-rows/ta-p/9592 

Personally, i would have thought that enabling “Allow rendering Pivot Table content as HTML“ would be preferred.

Version history
Last update:
‎03-02-2023 09:42 AM
Updated by:
Contributors