Does any body knows how could I trigger a script code in a spreadsheet mit app inventor.
I mean when I press a buttom how could I run the code.
the let me give more detail about it. we have an app that send information to an spreadsheet, then this information needs to be handle I mean update some rows and delete another rows. and we also need to save a register for this information. in order to do it I create a code that can copy the las row "the row send" and past it in another sheet.
var ss = SpreadsheetApp.openById(e.parameter.SHEETID);
var sh = ss.getSheetByName(e.parameter.SHEETNAME);
var rg = sh.getDataRange().getValues();
var Funcion = e.parameter.FUNCION
if (Funcion == 'ENVIAR' ) {
var registro = e.parameter.REGISTRO.split(',');
sh.appendRow(registro);
return ContentService.createTextOutput("New record created");
}
if ( Funcion == "Duplic" ) {
Duplic();
}
and the blocks like this
Is there a way to trigger bothe codes with the same buttom ?
I try to do like this but is not working
now I realize duplic is wrong is like this 'duplic' I am going to try like this and I go back
sir can you help me please