I'm using google spreadsheet scripting. I track my dispatches there. I created a button that when pressed uses the row you are in to create a calendar event. My current problem I'm working with is finding what type of task the event will be and the date. The 3 columns I'm working with are: Delivery, Integration, Training. All are dates. My first if else I'm assigning the date to a variable that will be used as the event start date/time. The second if else I'm assigning the task type to a variable to append to the event title.
My current error is: Missing ; before statement (line 15) - that is my first if
function AddEvent() {
var ss = SpreadsheetApp.getActiveSheet();
var row = ss.getActiveRange().getRow();
var rec = ss.getRange(row,2,1,28).getValues();
var loc = ss.getRange(row,5).getValue();
var ttl = ss.getRange(row,2).getValue();
var typ;
var stt;
var del=ss.getRange(row,10).getValue();
var int=ss.getRange(row,11).getValue();
var trn=ss.getRange(row,12).getValue();
//determine what date to use, del-delivery, int-integration, trn-training
If (isBlank(trn)=False) {stt=trn};
Else If (isBlank(int)=False) {stt=int};
Else {stt=del};
//I will append my event title with this value to know the task type
If (isBlank(trn)=False) {typ="Training: "};
Else If (isBlank(int)=False) {typ="Integration: "};
Else {typ="Delivery: "};
Logger.log(stt, typ);
}