If you change a formula or a variable that is used in a formula very often, you have the option to add a script that will recalculate your formula every day. Please follow this guide to add your script.
Step 1: Open the Ragic workflow editor.
Right-click on any of the application tabs and select Javascript Workflow, which will take you to the Workflow Module.
Step 2: Switch edit page to "Daily Workflow".
Step 3: Add the code for sheet formula recalculation.
If the URL link of the sheet you want to do this job is https://www.ragic.com/accountname/tabname/1
Add this line to the daily workflow:
db.recalculateAll("/tabname/1");
Don't forget to save your changes!
Step 1: Open the Ragic workflow editor.
Right-click on any of the application tabs and select Javascript Workflow, which will take you to the Workflow Module.
Step 2: Switch edit page to "Global Workflow".
Step 3. Copy and paste the scripts
function dailyFormulaRecalculate(pathSheet){
var pageSize = 1000; //read 1000 entries at a time
var qMain = db.getAPIQuery(pathSheet);
qMain.setUpdateMode();
var mainAr = null, mainOffset = 0;
while(mainAr==null || mainAr.hasMore()){
qMain.resetData();
qMain.setLimitSize(pageSize);
qMain.setLimitFrom(mainOffset);
mainAr = qMain.getAPIResults();
var iterator = mainAr.iterator();
while(iterator.hasNext()){
var entry = iterator.next();
entry.recalculateFormula(field ID);
entry.save();
}
mainOffset += mainAr.getData().size();
}
}
For field id please replace it with the field id of the fields that you would like to recalculate. So the result would look something like this:
entry.recalculateFormula(1000001);
entry.recalculateFormula(1000002);
entry.recalculateFormula(1000003);
Step 4. Switch edit page to "Daily Workflow"
If the URL link of the sheet you want to do this job is https://www.ragic.com/accountname/tabname/1
Add this line to the daily workflow:
dailyFormulaRecalculate("/tabname/1");