reference: https://www.youtube.com/watch?v=jwGYOYeNKsA https://www.youtube.com/watch?v=SeEQKmYQxRc /// function AddNewInventory() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var shtAD = ss.getSheetByName("Add & Deploy"); var shtTrans = ss.getSheetByName("Transaction History"); var d = new Date(); var rngToAdd = shtAD.getRange("D2:D6").getValues(); var horizRng = rngToAdd.flat(); horizRng.push(0, horizRng[4], d.toLocaleString()); var finalRng = [horizRng]; var lastRow = shtTrans.getLastRow() + 1; shtTrans.getRange("A" + lastRow + ":H" + lastRow).setValues(finalRng); shtAD.getRange("D2").clearContent(); shtAD.getRange("D3:D9").clearContent(); } function AddNewInventoryForm(description, purchaseDate, unitCost, quantity) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var shtTrans = ss.getSheetByName("Transaction History"); var d = new Date(); var finalRng = [description, purchaseDate, unitCost, quantity, (unitCost*quantity), d.toLocaleString()]; var lastRow = shtTrans.getLastRow() + 1; shtTrans.getRange("A" + lastRow + ":F" + lastRow).setValues([finalRng]); //shtTrans.appendRow(finalRng); } function AddInventoryForm() { var form = HtmlService.createHtmlOutputFromFile('addInventory').setTitle('Add Inventory'); SpreadsheetApp.getUi().showSidebar(form); } function addMenu() { var menu = SpreadsheetApp.getUi().createMenu('Inventory Tracker'); menu.addItem('Add Inventory', 'AddInventoryForm'); menu.addToUi(); } function onOpen(e) { addMenu(); } /// addInventory.html ===