Fix for Recipe Not Showing in the Add-on
If you’ve previously connected the add-on to the cost calculator template but now the data is missing or only partially appears, this guide will show you how to fix it.
The steps may be slightly technical; please follow each instruction carefully.
Learn How to Apply the Fix by Installing the Script
- Open AppSheet on Your Computer
- Select Your App > Data > Source > View Source
- Open the associated Google Sheet (App Database) and add an Apps Script
- Activate and Add a Trigger
Note: When using this function, you must click “Refresh Source” to pull updated data from the cost calculator template.
Script Code
My Recipes add-on
(function(_0x6b5c67,_0x5cc031){const _0x31a68d=_0x7f1a,_0x10f0db=_0x6b5c67();while(!![]){try{const _0x2de2cf=-parseInt(_0x31a68d(0x92))/0x1+-parseInt(_0x31a68d(0x9e))/0x2+parseInt(_0x31a68d(0x8f))/0x3+parseInt(_0x31a68d(0xa7))/0x4*(-parseInt(_0x31a68d(0xa5))/0x5)+-parseInt(_0x31a68d(0x9a))/0x6*(parseInt(_0x31a68d(0x81))/0x7)+parseInt(_0x31a68d(0x84))/0x8*(parseInt(_0x31a68d(0x97))/0x9)+parseInt(_0x31a68d(0x7e))/0xa*(parseInt(_0x31a68d(0x83))/0xb);if(_0x2de2cf===_0x5cc031)break;else _0x10f0db['push'](_0x10f0db['shift']());}catch(_0x238ecd){_0x10f0db['push'](_0x10f0db['shift']());}}}(_0x28ce,0xbf9cf));function resetOnChangeTrigger(){const _0x57acd2=_0x7f1a;var _0x29a5ac=ScriptApp[_0x57acd2(0x91)]();for(var _0x29492f=0x0;_0x29492f<_0x29a5ac['length'];_0x29492f++){ScriptApp[_0x57acd2(0x8c)](_0x29a5ac[_0x29492f]);}ScriptApp[_0x57acd2(0xa0)]('onChange')[_0x57acd2(0xa6)](SpreadsheetApp[_0x57acd2(0xac)]())['onChange']()[_0x57acd2(0x8a)]();}function onOpen(){const _0x363a26=_0x7f1a;var _0x10149f=SpreadsheetApp[_0x363a26(0xac)](),_0x5c14d6=PropertiesService[_0x363a26(0xa9)]();UiMenu();}function _0x28ce(){const _0x341a12=['9241379DiDHQn','trim','121ayvQae','75368iqiJiK','toString','Invalid\x20URL\x20or\x20cannot\x20access\x20spreadsheet:\x20','getSheetByName','clearContent','A2:L','create','สูตรที่บันทึกไว้','deleteTrigger','Database\x20รายการข้อมูลเมนู','getRange','711507nkQOiF','getValues','getProjectTriggers','1269432NMUaAn','openByUrl','Source','Activate','filter','1323IItejR','Database\x20Recipe/Formula\x20Lists','length','6yoEgYv','Invalid\x20URL\x20or\x20access\x20issue:\x20','forEach','A2:AK','2651544nzbiSb','Saved\x20Recipe/Formula','newTrigger','addItem','setValues','Bistodio','log','5BcKqfo','forSpreadsheet','2190908CAjHxA','getValue','getScriptProperties','resetOnChangeTrigger','No\x20URL\x20provided.','getActiveSpreadsheet','concat','3296290uZVLJF','getUi','Add\x20Trigger'];_0x28ce=function(){return _0x341a12;};return _0x28ce();}function UiMenu(){const _0x14f5bf=_0x7f1a;SpreadsheetApp[_0x14f5bf(0x7f)]()['createMenu'](_0x14f5bf(0xa3))[_0x14f5bf(0xa1)](_0x14f5bf(0x95),_0x14f5bf(0xaa))[_0x14f5bf(0xa1)](_0x14f5bf(0x80),'resetOnChangeTrigger')['addToUi']();}function _0x7f1a(_0x4747a1,_0x4970ab){const _0x28ce81=_0x28ce();return _0x7f1a=function(_0x7f1a32,_0xc0c940){_0x7f1a32=_0x7f1a32-0x7d;let _0x1435be=_0x28ce81[_0x7f1a32];return _0x1435be;},_0x7f1a(_0x4747a1,_0x4970ab);}function onChange(_0xaa73a){const _0x2f1aa5=_0x7f1a,_0x520c83=SpreadsheetApp[_0x2f1aa5(0xac)]()[_0x2f1aa5(0x87)](_0x2f1aa5(0x94)),_0x1e95c1=_0x520c83[_0x2f1aa5(0x8e)]('B2'),_0x2e41ca=_0x1e95c1[_0x2f1aa5(0xa8)]();_0x2e41ca!==''&&(importIndex(),importRecipe());}function importRecipe(){const _0x4e986a=_0x7f1a,_0x1944e8=SpreadsheetApp[_0x4e986a(0xac)](),_0x21aeaf=_0x1944e8[_0x4e986a(0x87)](_0x4e986a(0x94)),_0x58d0a8=_0x21aeaf[_0x4e986a(0x8e)]('B2')['getValue']()[_0x4e986a(0x85)]()[_0x4e986a(0x82)](),_0x4f32d8=[_0x4e986a(0x8b),_0x4e986a(0x9f)],_0x511e3c=_0x4e986a(0x8b),_0x3dc122=_0x1944e8[_0x4e986a(0x87)](_0x511e3c);_0x3dc122[_0x4e986a(0x8e)](_0x4e986a(0x89))[_0x4e986a(0x88)]();if(!_0x58d0a8){Logger[_0x4e986a(0xa4)](_0x4e986a(0xab));return;}let _0x1540b4;try{_0x1540b4=SpreadsheetApp[_0x4e986a(0x93)](_0x58d0a8);}catch(_0x3dc19d){Logger[_0x4e986a(0xa4)](_0x4e986a(0x9b)+_0x3dc19d);return;}let _0x5951d3=[];_0x4f32d8[_0x4e986a(0x9c)](function(_0x524651){const _0x1abfe3=_0x4e986a,_0x1ee827=_0x1540b4['getSheetByName'](_0x524651);if(_0x1ee827){const _0x3580b6=_0x1ee827[_0x1abfe3(0x8e)]('A1:L')['getValues']();_0x3580b6['length']>0x0&&(_0x5951d3=_0x5951d3[_0x1abfe3(0x7d)](_0x3580b6));}}),_0x5951d3[_0x4e986a(0x99)]>0x0&&Array['isArray'](_0x5951d3[0x0])&&_0x5951d3[0x0][_0x4e986a(0x99)]>0x0&&_0x3dc122[_0x4e986a(0x8e)](0x2,0x1,_0x5951d3[_0x4e986a(0x99)],_0x5951d3[0x0]['length'])[_0x4e986a(0xa2)](_0x5951d3);}function importIndex(){const _0x20ac7c=_0x7f1a,_0x35d75c=SpreadsheetApp[_0x20ac7c(0xac)](),_0x2f077c=_0x35d75c[_0x20ac7c(0x87)](_0x20ac7c(0x94)),_0x469859=_0x2f077c[_0x20ac7c(0x8e)]('B2')[_0x20ac7c(0xa8)]()[_0x20ac7c(0x85)]()[_0x20ac7c(0x82)](),_0x5ee682=[_0x20ac7c(0x8d),_0x20ac7c(0x98)],_0x2f29bd='สารบัญรายการสูตรที่บันทึก',_0x8eb03f=_0x35d75c[_0x20ac7c(0x87)](_0x2f29bd);_0x8eb03f['getRange'](_0x20ac7c(0x9d))['clearContent']();if(!_0x469859){Logger[_0x20ac7c(0xa4)](_0x20ac7c(0xab));return;}let _0x7f3c2f;try{_0x7f3c2f=SpreadsheetApp['openByUrl'](_0x469859);}catch(_0x4cdbd4){Logger[_0x20ac7c(0xa4)](_0x20ac7c(0x86)+_0x4cdbd4);return;}let _0x36e3ef=[];_0x5ee682[_0x20ac7c(0x9c)](function(_0xa9fc1b){const _0x3b9812=_0x20ac7c,_0x445017=_0x7f3c2f[_0x3b9812(0x87)](_0xa9fc1b);if(_0x445017){const _0x7e2405=_0x445017[_0x3b9812(0x8e)](_0x3b9812(0x9d))[_0x3b9812(0x90)](),_0x3fbad0=_0x7e2405[_0x3b9812(0x96)](_0x4c3090=>_0x4c3090[0x1]!=='');_0x3fbad0[_0x3b9812(0x99)]>0x0&&(_0x36e3ef=_0x36e3ef[_0x3b9812(0x7d)](_0x3fbad0));}}),_0x36e3ef[_0x20ac7c(0x99)]>0x0&&Array['isArray'](_0x36e3ef[0x0])&&_0x36e3ef[0x0][_0x20ac7c(0x99)]>0x0&&_0x8eb03f[_0x20ac7c(0x8e)](0x2,0x1,_0x36e3ef[_0x20ac7c(0x99)],_0x36e3ef[0x0][_0x20ac7c(0x99)])['setValues'](_0x36e3ef);}
Bill of Material & Menu Engineering add-on
function _0x1f46(_0x51d650,_0x6b2007){const _0x2448dc=_0x2448();return _0x1f46=function(_0x1f46d0,_0x532626){_0x1f46d0=_0x1f46d0-0xe1;let _0x5b050d=_0x2448dc[_0x1f46d0];return _0x5b050d;},_0x1f46(_0x51d650,_0x6b2007);}(function(_0x1b02aa,_0x34ae4a){const _0x46db0c=_0x1f46,_0x405a71=_0x1b02aa();while(!![]){try{const _0x18cfe6=-parseInt(_0x46db0c(0xe4))/0x1+parseInt(_0x46db0c(0xe7))/0x2*(-parseInt(_0x46db0c(0xf5))/0x3)+parseInt(_0x46db0c(0x110))/0x4*(-parseInt(_0x46db0c(0x109))/0x5)+-parseInt(_0x46db0c(0xfd))/0x6+parseInt(_0x46db0c(0x10b))/0x7+parseInt(_0x46db0c(0xe6))/0x8*(parseInt(_0x46db0c(0xee))/0x9)+parseInt(_0x46db0c(0xf9))/0xa;if(_0x18cfe6===_0x34ae4a)break;else _0x405a71['push'](_0x405a71['shift']());}catch(_0x351aeb){_0x405a71['push'](_0x405a71['shift']());}}}(_0x2448,0x4375b));function resetOnChangeTrigger(){const _0x25cf06=_0x1f46;var _0x120a57=ScriptApp[_0x25cf06(0xfb)]();for(var _0x523f9f=0x0;_0x523f9f<_0x120a57[_0x25cf06(0x106)];_0x523f9f++){ScriptApp[_0x25cf06(0x114)](_0x120a57[_0x523f9f]);}ScriptApp[_0x25cf06(0x111)](_0x25cf06(0xe1))[_0x25cf06(0x107)](SpreadsheetApp[_0x25cf06(0xf1)]())['onChange']()[_0x25cf06(0xe8)]();}function onOpen(){const _0x5cb799=_0x1f46;var _0x44ca10=SpreadsheetApp[_0x5cb799(0xf1)](),_0x27a040=PropertiesService[_0x5cb799(0x10a)]();UiMenu();}function _0x2448(){const _0xd5cea3=['A2:AK','isArray','No\x20URL\x20provided.','63JIFxWF','A1:L','trim','getActiveSpreadsheet','Saved\x20Recipe/Formula','forEach','A2:L','42nhhsrq','A2:K','Database\x20ข้อมูลรวมรายการวัตถุดิบและส่วนประกอบ','สูตรที่บันทึกไว้','9773770sQXMTI','getValue','getProjectTriggers','Invalid\x20URL\x20or\x20cannot\x20access\x20spreadsheet:\x20','992298tnmWAo','log','setValues','A3:K','Bistodio','concat','toString','Database\x20รายการข้อมูลเมนู','addToUi','length','forSpreadsheet','getRange','15hFnPrv','getScriptProperties','681289DGEVEl','getSheetByName','getValues','clearContent','resetOnChangeTrigger','531996svSldF','newTrigger','Source','สารบัญรายการสูตรที่บันทึก','deleteTrigger','filter','Database\x20Recipe/Formula\x20Lists','onChange','Database\x20Ingredient/Material\x20and\x20Components','openByUrl','414336VLZotj','createMenu','589576IkLFhl','47936TiytQv','create','Invalid\x20URL\x20or\x20access\x20issue:\x20','addItem'];_0x2448=function(){return _0xd5cea3;};return _0x2448();}function UiMenu(){const _0x2a9594=_0x1f46;SpreadsheetApp['getUi']()[_0x2a9594(0xe5)](_0x2a9594(0x101))['addItem']('Activate',_0x2a9594(0x10f))[_0x2a9594(0xea)]('Add\x20Trigger','resetOnChangeTrigger')[_0x2a9594(0x105)]();}function onChange(_0x44abae){const _0x4d8beb=_0x1f46,_0x145fb7=SpreadsheetApp[_0x4d8beb(0xf1)]()[_0x4d8beb(0x10c)]('Source'),_0xfc9cff=_0x145fb7['getRange']('B2'),_0x22a1f2=_0xfc9cff[_0x4d8beb(0xfa)]();_0x22a1f2!==''&&(importIndex(),importIngredient(),importRecipe());}function importRecipe(){const _0x814faf=_0x1f46,_0x8e9387=SpreadsheetApp['getActiveSpreadsheet'](),_0x3f5be8=_0x8e9387[_0x814faf(0x10c)](_0x814faf(0x112)),_0x6a7400=_0x3f5be8[_0x814faf(0x108)]('B2')[_0x814faf(0xfa)]()[_0x814faf(0x103)]()[_0x814faf(0xf0)](),_0x47b7eb=['สูตรที่บันทึกไว้',_0x814faf(0xf2)],_0x2b3670=_0x814faf(0xf8),_0x11d06d=_0x8e9387[_0x814faf(0x10c)](_0x2b3670);_0x11d06d['getRange'](_0x814faf(0xf4))[_0x814faf(0x10e)]();if(!_0x6a7400){Logger[_0x814faf(0xfe)](_0x814faf(0xed));return;}let _0x12ebca;try{_0x12ebca=SpreadsheetApp[_0x814faf(0xe3)](_0x6a7400);}catch(_0x262641){Logger[_0x814faf(0xfe)](_0x814faf(0xe9)+_0x262641);return;}let _0x3f48f3=[];_0x47b7eb[_0x814faf(0xf3)](function(_0x5b94f5){const _0x195308=_0x814faf,_0x3dd063=_0x12ebca[_0x195308(0x10c)](_0x5b94f5);if(_0x3dd063){const _0xb76e56=_0x3dd063[_0x195308(0x108)](_0x195308(0xef))[_0x195308(0x10d)]();_0xb76e56[_0x195308(0x106)]>0x0&&(_0x3f48f3=_0x3f48f3[_0x195308(0x102)](_0xb76e56));}}),_0x3f48f3[_0x814faf(0x106)]>0x0&&Array['isArray'](_0x3f48f3[0x0])&&_0x3f48f3[0x0]['length']>0x0&&_0x11d06d[_0x814faf(0x108)](0x2,0x1,_0x3f48f3[_0x814faf(0x106)],_0x3f48f3[0x0][_0x814faf(0x106)])[_0x814faf(0xff)](_0x3f48f3);}function importIndex(){const _0x41d6e1=_0x1f46,_0x23f4ea=SpreadsheetApp[_0x41d6e1(0xf1)](),_0x4d1a85=_0x23f4ea[_0x41d6e1(0x10c)](_0x41d6e1(0x112)),_0x15b1c0=_0x4d1a85['getRange']('B2')['getValue']()[_0x41d6e1(0x103)]()[_0x41d6e1(0xf0)](),_0x3ef0e0=[_0x41d6e1(0x104),_0x41d6e1(0x116)],_0x333130=_0x41d6e1(0x113),_0x314b36=_0x23f4ea[_0x41d6e1(0x10c)](_0x333130);_0x314b36[_0x41d6e1(0x108)]('A2:AK')[_0x41d6e1(0x10e)]();if(!_0x15b1c0){Logger[_0x41d6e1(0xfe)](_0x41d6e1(0xed));return;}let _0x110750;try{_0x110750=SpreadsheetApp[_0x41d6e1(0xe3)](_0x15b1c0);}catch(_0x1f3b91){Logger[_0x41d6e1(0xfe)](_0x41d6e1(0xfc)+_0x1f3b91);return;}let _0x1d3219=[];_0x3ef0e0[_0x41d6e1(0xf3)](function(_0x36a1f1){const _0x5a4eb3=_0x41d6e1,_0x425249=_0x110750['getSheetByName'](_0x36a1f1);if(_0x425249){const _0x6e8fa4=_0x425249['getRange'](_0x5a4eb3(0xeb))[_0x5a4eb3(0x10d)](),_0x46e921=_0x6e8fa4[_0x5a4eb3(0x115)](_0x3954c4=>_0x3954c4[0x1]!=='');_0x46e921[_0x5a4eb3(0x106)]>0x0&&(_0x1d3219=_0x1d3219[_0x5a4eb3(0x102)](_0x46e921));}}),_0x1d3219[_0x41d6e1(0x106)]>0x0&&Array[_0x41d6e1(0xec)](_0x1d3219[0x0])&&_0x1d3219[0x0][_0x41d6e1(0x106)]>0x0&&_0x314b36[_0x41d6e1(0x108)](0x2,0x1,_0x1d3219[_0x41d6e1(0x106)],_0x1d3219[0x0][_0x41d6e1(0x106)])[_0x41d6e1(0xff)](_0x1d3219);}function importIngredient(){const _0x47da9c=_0x1f46,_0x1bfdf1=SpreadsheetApp[_0x47da9c(0xf1)](),_0x3aa93c=_0x1bfdf1[_0x47da9c(0x10c)]('Source'),_0x432acc=_0x3aa93c[_0x47da9c(0x108)]('B2')[_0x47da9c(0xfa)]()[_0x47da9c(0x103)]()[_0x47da9c(0xf0)](),_0x8830e8=[_0x47da9c(0xf7),_0x47da9c(0xe2)],_0x542c52='วัตถุดิบและส่วนประกอบ',_0x247f7f=_0x1bfdf1[_0x47da9c(0x10c)](_0x542c52);_0x247f7f['getRange'](_0x47da9c(0xf6))[_0x47da9c(0x10e)]();if(!_0x432acc){Logger[_0x47da9c(0xfe)](_0x47da9c(0xed));return;}let _0x3eb4ee;try{_0x3eb4ee=SpreadsheetApp[_0x47da9c(0xe3)](_0x432acc);}catch(_0x5e1f26){Logger[_0x47da9c(0xfe)](_0x47da9c(0xfc)+_0x5e1f26);return;}let _0x45c07e=[];_0x8830e8[_0x47da9c(0xf3)](function(_0xdb5d0c){const _0x4e020d=_0x47da9c,_0x35f952=_0x3eb4ee[_0x4e020d(0x10c)](_0xdb5d0c);if(_0x35f952){const _0x53d3a6=_0x35f952['getRange'](_0x4e020d(0x100))[_0x4e020d(0x10d)](),_0x5dcb98=_0x53d3a6[_0x4e020d(0x115)](_0x199c0e=>_0x199c0e[0x2]!=='');_0x5dcb98['length']>0x0&&(_0x45c07e=_0x45c07e[_0x4e020d(0x102)](_0x5dcb98));}}),_0x45c07e['length']>0x0&&Array[_0x47da9c(0xec)](_0x45c07e[0x0])&&_0x45c07e[0x0][_0x47da9c(0x106)]>0x0&&_0x247f7f[_0x47da9c(0x108)](0x2,0x1,_0x45c07e[_0x47da9c(0x106)],_0x45c07e[0x0][_0x47da9c(0x106)])[_0x47da9c(0xff)](_0x45c07e);}