I would like to separate the description of a calendar event onto different lines. At the moment I am retrieving responses from a Form to populate the description field. I'd like each variable description to be on a different line
I have looked at the article How to escape JSON string? but as my responses vary as the form responses differ (and the fact I am at a beginner level) I can't work out a way to achieve it.
function CreateEvent() {
var vSS = SpreadsheetApp.getActiveSpreadsheet();
var vS = vSS.getActiveSheet();
var vBooker = vS.getRange("B2").getValue();
var vStartDate = vS.getRange("C2").getValue();
var vEndDate = vS.getRange("D2").getValue();
var calendar = CalendarApp.getCalendarById(
'blah.com_79u2vjeeepkpra94hp12nbscc0@group.calendar.google.com');
var vlocation = vS.getRange("E2").getValue();
var vVolume = vS.getRange("F2").getValue();
var vVolumeOther = vS.getRange("G2").getValue();
var vBusiness = vS.getRange("H2").getValue();
var vBusinessOther = vS.getRange("I2").getValue();
var vPhotographer = vS.getRange("J2").getValue();
var vPhotographerOther = vS.getRange("K2").getValue();
var advancedArgs ={description: ('Volume of images required = ' + vVolume + ' If Other = ' +
vVolumeOther + ' Project Business Area = ' + vBusiness + ' If Other = ' + vBusinessOther
+ ' Photographer Name = ' + vPhotographer + ' If Other = ' + vPhotographerOther),
location: vlocation, sendInvites:true}
var event = calendar.createEvent('Booked by ' + vBooker,
new Date(vStartDate),
new Date(vEndDate),
advancedArgs);
Logger.log('Event ID: ' + event.getId());