add links in table
Hello
I have made a table with 3 things "Types", "Dates" and "Recordings"
Recordings are external URLs
I want to replace long URL with one word
Here is my code
var dt2= @All of New Call Created On;
var time2= @All of Call - Time in America with nulls;
var type2=@All of Type with nulls;
var smrt2=@All of smrtPhone Number with nulls;
var text2=@All of Call Recording with nulls;
var lines = [];
for(var i = 0; i < smrt2.length; i++){
lines.push(type2[i] + "|" + dt2[i] + "|" + text2[i]);
};
"Types | Dates | Recordings \n" +
"--- | --- | --- \n" + lines.join("\n")
Here is screenshot
Thank You!
-
Sorry James, but this is wrong.:
You can make the var text2 into:
var text2 = "[Recording Link](" + @All of Call Recording with nulls + ")";
Ahsan needs to loop through the array text 2, so the link must be composed in each iteration. But your var text2 parse the array to string so it can't be used in the loop.
var text2 must be kept as it is in Ashan's code. The code must be modified in this line:lines.push(type2[i] + "|" + dt2[i] + "|[Recording link](" + text2[i] + ")");
Rainer
Please sign in to leave a comment.
Comments
2 comments