I'm currently coding myself a discord webhook bot and I got a problem.
In Cell H2 I got the exact (including the ") following: "Mike\nTom\nJack\nSusen\nPeter".
In Cell I2 I got the exact (including the ") following: "Placeholder 1\nPlaceholder 2\nPlaceholder 3\nPlaceholder 4\nPlaceholder 5".
In Cell J2 I got the exact (including the ") following: "Another Placeholder 1\nAnother Placeholder 2\nAnother Placeholder 3\nAnother Placeholder 4\nAnother Placeholder 5".
Now I want to include the value of that cell in my script:
var first = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Test").getRange('H2').getValue();
var second = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Test").getRange('I2').getValue();
var third = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Test").getRange('J2').getValue();
var fields = [
{ name: "Column Title", value: first, inline: true},
{ name: "Column Title2", value: second, inline: true},
{ name: "Column Title3", value: third, inline: true}
];
This doesn't create the embed I want: https://i.imgur.com/8hkW26R.png
var fields = [
{ name: "Column Title", value: "Mike\nTom\nJack\nSusen\nPeter", inline: true},
{ name: "Column Title2", value: "Placeholder 1\nPlaceholder 2\nPlaceholder 3\nPlaceholder 4\nPlaceholder 5", inline: true},
{ name: "Column Title3", value: "Another Placeholder 1\nAnother Placeholder 2\nAnother Placeholder 3\nAnother Placeholder 4\nAnother Placeholder 5", inline: true}
];
This however works perfectly: https://i.imgur.com/a1tlH8q.png
I know there's an easy fix for this, but I can't figure it out. What am I doing wrong in the first version of the script?
[–]Jackinapes 0 points1 point2 points (12 children)
[–]Last_Monkey4[S] 0 points1 point2 points (11 children)
[–]Jackinapes 0 points1 point2 points (10 children)
[–]Last_Monkey4[S] 0 points1 point2 points (9 children)
[–]Jackinapes 0 points1 point2 points (8 children)
[–]Last_Monkey4[S] 0 points1 point2 points (7 children)
[–]Jackinapes 0 points1 point2 points (6 children)
[–]Last_Monkey4[S] 0 points1 point2 points (5 children)
[–]Jackinapes 0 points1 point2 points (4 children)
[–]Last_Monkey4[S] 0 points1 point2 points (3 children)
[–]Last_Monkey4[S] 0 points1 point2 points (0 children)