There is a more recent run of this report. Click here to view it.

Report not found

There was a problem finding this report.
Making Links without URLs
May 21, 2015 · Refreshed over 4 years ago
Description
How to make results links without displaying the full URL.

Collaborators

Run History
SELECT RIGHT(permalink,LENGTH(permalink) - 9) AS name, funding_total_usd AS total_money_raised FROM tutorial.crunchbase_companies WHERE funding_total_usd IS NOT NULL ORDER BY funding_total_usd DESC LIMIT 10
SELECT RIGHT(permalink,LENGTH(permalink) - 9) AS name, funding_total_usd AS total_money_raised FROM tutorial.crunchbase_companies WHERE funding_total_usd IS NOT NULL ORDER BY funding_total_usd DESC LIMIT 10
<div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <mode-table id="table_5dc45e2d6c25" dataset="dataset" options="table_options"></mode-table> <script> // Format columns here var linkFormat = [ { column: "name", link_string: "https://www.crunchbase.com/organization/{{name}}" } ] // End formatting var colIndex = {}; dataset.columns.forEach(function(c,i) { colIndex[c.name] = i; if (c.name.slice(-6) == "__link") { var entry = { column: c.name, link_string: "{{" + c.name + "}}" }; linkFormat.push(entry) } }) setTimeout(function(){ var tableDiv = $(".table-element.mode-table.mode-report-table"), rows = tableDiv.find("tr"); rows.each(function() { var cells = $(this).find("td"); linkFormat.forEach(function(l) { var columnToShow = colIndex[l.column], cellContent = cells.eq(columnToShow).text(); url = l.link_string; while (url.indexOf("{{") != - 1) { var chars = url.length, start = url.indexOf("{{"), end = url.substring(start+2,chars).indexOf("}}"), cName = url.substring(start+2,start+end+2), full = url.substring(start,start+end+4), col = colIndex[cName], content = cells.eq(col).text(); url = url.replace(full,content); } cells.eq(columnToShow).html("<a target='_blank' href='" + url + "'>" + cellContent + "</a>") }) }) },1000); </script>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled