Replied 15 September 2020, 12:21 am EST
I am able to get the custom function working correctly (Thanks for your example).
I call the modal page on click of button to enter my params.
Suppose on the current cell, I already have another function defined e.g "=SUM(A1 + "
. and then click the button to add my formula.
Now I want my custom function formula from modal page to append to the already current formula in cell.
After I enter my params in modal page on submit the formula should be "=SUM(A1 + MYFORMULA(1,2,3) )"
var formula = "myFormulaFromModalPage";
var r = activeSheet.getActiveRowIndex(),
c = activeSheet.getActiveColumnIndex(),
currValue = activeSheet.getValue(r, c); // To get the current formula in the cell already
console.log(currValue); // This is blank
.formula(currValue + formula);
Can you please suggest what I am doing wrong? How to get this working?