I changedd all the IDs to 999, although there shouldn't be any sensative info :P
Retool community: https://community.retool.com/t/date-range-helpers-component/7333
{ | |
"uuid": "999", | |
"page": { | |
"id": 999, | |
"data": { | |
"appState": "[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"isFetching\",false,\"plugins\",[\"~#iOM\",[\"moduleContainer\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"moduleContainer\",\"type\",\"widget\",\"subtype\",\"ModuleContainerWidget\",\"resourceName\",\"\",\"resourceDisplayName\",null,\"template\",[\"^3\",[\"heightType\",\"fixed\",\"spinWhenChildrenAreFetching\",true,\"showBorder\",true,\"showDropShadow\",true,\"isGlobalWidgetContainer\",true,\"style\",[\"^3\",[]],\"backgroundColor\",\"white\",\"title\",\"\",\"overflowType\",\"hidden\",\"disabled\",\"\"]],\"style\",[\"^3\",[]],\"position2\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"container\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"\",\"row\",0,\"col\",0,\"height\",1.2,\"width\",7,\"tabNum\",0]]],\"mobilePosition2\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",0,\"^>\",12,\"^?\",12,\"^@\",0]]],\"tabIndex\",null,\"createdAt\",\"~m1636493892840\",\"updatedAt\",\"~m1636493892840\",\"^;\",\"\",\"folder\",\"\"]]],\"toggle_this_month\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"toggle_this_month\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"iconAfter\",\"\",\"submitTargetId\",\"\",\"hidden\",null,\"text\",\"This month\",\"showInEditor\",null,\"tooltipText\",\"\",\"style\",[\"^3\",[\"background\",\"{{range_helper_state.value == \\\"This month\\\" ? \\\"#2AAB57\\\" : \\\"grey\\\"}}\"]],\"submit\",false,\"iconBefore\",\"\",\"events\",[\"~#iL\",[[\"^3\",[\"event\",\"click\",\"type\",\"datasource\",\"method\",\"trigger\",\"pluginId\",\"set_this_month\",\"params\",[\"^3\",[]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",\"\",\"disabled\",\"\",\"maintainSpaceWhenHidden\",null]],\"^9\",[\"^3\",[]],\"^:\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"moduleContainer\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",4,\"^>\",1,\"^?\",2,\"^@\",0]]],\"^A\",null,\"^B\",null,\"^C\",\"~m1636493901607\",\"^D\",\"~m1636493901607\",\"^;\",\"\",\"^E\",\"\"]]],\"toggle_last_month\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"toggle_last_month\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"iconAfter\",\"\",\"submitTargetId\",\"\",\"hidden\",null,\"text\",\"Last month\",\"showInEditor\",null,\"tooltipText\",\"\",\"style\",[\"^3\",[\"background\",\"{{range_helper_state.value == \\\"Last month\\\" ? \\\"#2AAB57\\\" : \\\"grey\\\"}}\"]],\"submit\",false,\"iconBefore\",\"\",\"events\",[\"^F\",[[\"^3\",[\"event\",\"click\",\"type\",\"datasource\",\"method\",\"trigger\",\"pluginId\",\"set_last_month\",\"params\",[\"^3\",[]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",\"\",\"disabled\",\"\",\"maintainSpaceWhenHidden\",null]],\"^9\",[\"^3\",[]],\"^:\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"moduleContainer\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",6,\"^>\",1,\"^?\",2,\"^@\",0]]],\"^A\",null,\"^B\",null,\"^C\",\"~m1636493901708\",\"^D\",\"~m1636493901708\",\"^;\",\"\",\"^E\",\"\"]]],\"toggle_last_month2\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"toggle_last_month2\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"iconAfter\",\"\",\"submitTargetId\",\"\",\"hidden\",null,\"text\",\"Last 6 months\",\"showInEditor\",null,\"tooltipText\",\"\",\"style\",[\"^3\",[\"background\",\"{{range_helper_state.value == \\\"Last 6 months\\\" ? \\\"#2AAB57\\\" : \\\"grey\\\"}}\"]],\"submit\",false,\"iconBefore\",\"\",\"events\",[\"^F\",[[\"^3\",[\"event\",\"click\",\"type\",\"datasource\",\"method\",\"trigger\",\"pluginId\",\"set_last_six_months\",\"params\",[\"^3\",[]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",\"\",\"disabled\",\"\",\"maintainSpaceWhenHidden\",null]],\"^9\",[\"^3\",[]],\"^:\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"moduleContainer\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",8,\"^>\",1,\"^?\",2,\"^@\",0]]],\"^A\",null,\"^B\",null,\"^C\",\"~m1636493902118\",\"^D\",\"~m1636494707266\",\"^;\",\"\",\"^E\",\"\"]]],\"toggle_other\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"toggle_other\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"iconAfter\",\"\",\"submitTargetId\",\"\",\"hidden\",null,\"text\",\"Other\",\"showInEditor\",null,\"tooltipText\",\"\",\"style\",[\"^3\",[\"background\",\"{{range_helper_state.value == \\\"Other\\\" ? \\\"#2AAB57\\\" : \\\"grey\\\"}}\"]],\"submit\",false,\"iconBefore\",\"\",\"events\",[\"^F\",[[\"^3\",[\"event\",\"click\",\"type\",\"datasource\",\"method\",\"trigger\",\"pluginId\",\"set_last_six_months\",\"params\",[\"^3\",[]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",\"\",\"disabled\",\"\",\"maintainSpaceWhenHidden\",null]],\"^9\",[\"^3\",[]],\"^:\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"moduleContainer\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",10,\"^>\",1,\"^?\",2,\"^@\",0]]],\"^A\",null,\"^B\",null,\"^C\",\"~m1636493902267\",\"^D\",\"~m1636868142437\",\"^;\",\"\",\"^E\",\"\"]]],\"set_this_month\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"set_this_month\",\"^4\",\"datasource\",\"^5\",\"JavascriptQuery\",\"^6\",\"JavascriptQuery\",\"^7\",null,\"^8\",[\"^3\",[\"queryRefreshTime\",\"\",\"lastReceivedFromResourceAt\",null,\"queryDisabledMessage\",\"\",\"successMessage\",\"\",\"queryDisabled\",\"\",\"playgroundQuerySaveId\",\"latest\",\"resourceNameOverride\",\"\",\"runWhenModelUpdates\",false,\"showFailureToaster\",true,\"query\",\"startDate.setValue(moment().startOf('month').startOf('day').format(\\\"YYYY-MM-DD\\\"))\\nendDate.setValue(moment().format(\\\"YYYY-MM-DD\\\"))\",\"playgroundQueryUuid\",\"\",\"playgroundQueryId\",null,\"privateParams\",[\"^F\",[]],\"runWhenPageLoadsDelay\",\"\",\"data\",null,\"importedQueryInputs\",[\"^3\",[]],\"isImported\",false,\"showSuccessToaster\",false,\"cacheKeyTtl\",\"\",\"metadata\",null,\"errorTransformer\",\"// The variable 'data' allows you to reference the request's data in the transformer. \\n// example: return data.find(element => element.isError)\\nreturn data.error\",\"confirmationMessage\",null,\"isFetching\",false,\"rawData\",null,\"queryTriggerDelay\",\"0\",\"watchedParams\",[\"^F\",[]],\"enableErrorTransformer\",false,\"showLatestVersionUpdatedWarning\",false,\"timestamp\",0,\"importedQueryDefaults\",[\"^3\",[]],\"enableTransformer\",false,\"showUpdateSetValueDynamicallyToggle\",true,\"runWhenPageLoads\",true,\"transformer\",\"// type your code here\\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\\nreturn data\",\"events\",[\"^F\",[]],\"queryTimeout\",\"10000\",\"requireConfirmation\",false,\"queryFailureConditions\",\"\",\"enableCaching\",false,\"allowedGroups\",[\"^F\",[]],\"queryThrottleTime\",\"750\",\"updateSetValueDynamically\",false,\"notificationDuration\",\"\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636493917540\",\"^D\",\"~m1636869681484\",\"^;\",\"\",\"^E\",\"\"]]],\"set_last_month\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"set_last_month\",\"^4\",\"datasource\",\"^5\",\"JavascriptQuery\",\"^6\",\"JavascriptQuery\",\"^7\",null,\"^8\",[\"^3\",[\"queryRefreshTime\",\"\",\"lastReceivedFromResourceAt\",null,\"queryDisabledMessage\",\"\",\"successMessage\",\"\",\"queryDisabled\",\"\",\"playgroundQuerySaveId\",\"latest\",\"resourceNameOverride\",\"\",\"runWhenModelUpdates\",false,\"showFailureToaster\",true,\"query\",\"startDate.setValue(moment().add(-1, \\\"month\\\").startOf('month').startOf('day').format(\\\"YYYY-MM-DD\\\"));\\nendDate.setValue(moment().add(-1, \\\"month\\\").endOf('month').endOf('day').format(\\\"YYYY-MM-DD\\\"));\",\"playgroundQueryUuid\",\"\",\"playgroundQueryId\",null,\"privateParams\",[\"^F\",[]],\"runWhenPageLoadsDelay\",\"\",\"data\",null,\"importedQueryInputs\",[\"^3\",[]],\"isImported\",false,\"showSuccessToaster\",false,\"cacheKeyTtl\",\"\",\"metadata\",null,\"errorTransformer\",\"// The variable 'data' allows you to reference the request's data in the transformer. \\n// example: return data.find(element => element.isError)\\nreturn data.error\",\"confirmationMessage\",null,\"isFetching\",false,\"rawData\",null,\"queryTriggerDelay\",\"0\",\"watchedParams\",[\"^F\",[]],\"enableErrorTransformer\",false,\"showLatestVersionUpdatedWarning\",false,\"timestamp\",0,\"importedQueryDefaults\",[\"^3\",[]],\"enableTransformer\",false,\"showUpdateSetValueDynamicallyToggle\",true,\"runWhenPageLoads\",false,\"transformer\",\"// type your code here\\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\\nreturn data\",\"events\",[\"^F\",[]],\"queryTimeout\",\"10000\",\"requireConfirmation\",false,\"queryFailureConditions\",\"\",\"enableCaching\",false,\"allowedGroups\",[\"^F\",[]],\"queryThrottleTime\",\"750\",\"updateSetValueDynamically\",false,\"notificationDuration\",\"\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636493933478\",\"^D\",\"~m1636869685245\",\"^;\",\"\",\"^E\",\"\"]]],\"set_last_six_months\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"set_last_six_months\",\"^4\",\"datasource\",\"^5\",\"JavascriptQuery\",\"^6\",\"JavascriptQuery\",\"^7\",null,\"^8\",[\"^3\",[\"queryRefreshTime\",\"\",\"lastReceivedFromResourceAt\",null,\"queryDisabledMessage\",\"\",\"successMessage\",\"\",\"queryDisabled\",\"\",\"playgroundQuerySaveId\",\"latest\",\"resourceNameOverride\",\"\",\"runWhenModelUpdates\",false,\"showFailureToaster\",true,\"query\",\"startDate.setValue(moment().add(-5, \\\"month\\\").startOf('month').startOf('day').format(\\\"YYYY-MM-DD\\\"));\\nendDate.setValue(moment().startOf('day').format(\\\"YYYY-MM-DD\\\"));\",\"playgroundQueryUuid\",\"\",\"playgroundQueryId\",null,\"privateParams\",[\"^F\",[]],\"runWhenPageLoadsDelay\",\"\",\"data\",null,\"importedQueryInputs\",[\"^3\",[]],\"isImported\",false,\"showSuccessToaster\",false,\"cacheKeyTtl\",\"\",\"metadata\",null,\"errorTransformer\",\"// The variable 'data' allows you to reference the request's data in the transformer. \\n// example: return data.find(element => element.isError)\\nreturn data.error\",\"confirmationMessage\",null,\"isFetching\",false,\"rawData\",null,\"queryTriggerDelay\",\"0\",\"watchedParams\",[\"^F\",[]],\"enableErrorTransformer\",false,\"showLatestVersionUpdatedWarning\",false,\"timestamp\",0,\"importedQueryDefaults\",[\"^3\",[]],\"enableTransformer\",false,\"showUpdateSetValueDynamicallyToggle\",true,\"runWhenPageLoads\",false,\"transformer\",\"// type your code here\\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\\nreturn data\",\"events\",[\"^F\",[]],\"queryTimeout\",\"10000\",\"requireConfirmation\",false,\"queryFailureConditions\",\"\",\"enableCaching\",false,\"allowedGroups\",[\"^F\",[]],\"queryThrottleTime\",\"750\",\"updateSetValueDynamically\",false,\"notificationDuration\",\"\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636494501804\",\"^D\",\"~m1636869689628\",\"^;\",\"\",\"^E\",\"\"]]],\"range_helper_state\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"range_helper_state\",\"^4\",\"function\",\"^5\",\"Function\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"funcBody\",\"let startOfMonth = moment().startOf(\\\"month\\\").startOf(\\\"day\\\").toDate().toString();\\nlet startOfLastMonth = moment().subtract(1,'months').startOf(\\\"month\\\").startOf(\\\"day\\\").toDate().toString();\\nlet endOfLastMonth = moment().subtract(1,'months').endOf(\\\"month\\\").startOf(\\\"day\\\").toDate().toString();\\nlet today = moment().startOf(\\\"day\\\").toDate().toString();\\n\\nlet startOfSixMonthAgo = moment().add(-5, \\\"month\\\").startOf('month').startOf('day').toDate().toString();\\nlet endOfSixMonthAgo = moment().startOf('day').toDate().toString();\\n\\nlet specifiedStartDate = moment({{datepicker.value.start}}).startOf(\\\"day\\\").toDate().toString();\\nlet specifiedEndDate = moment({{datepicker.value.end}}).startOf(\\\"day\\\").toDate().toString();\\n\\nconsole.log(specifiedStartDate + \\\"\\\\n\\\" + startOfSixMonthAgo + \\\"\\\\n\\\" + specifiedEndDate + \\\"\\\\n\\\" + today)\\n\\nif (specifiedStartDate == startOfMonth && specifiedEndDate == today) {\\n\\treturn \\\"This month\\\"\\n} else if (specifiedStartDate == startOfLastMonth && specifiedEndDate == endOfLastMonth) {\\n\\treturn \\\"Last month\\\"\\n} else if (specifiedStartDate == startOfSixMonthAgo && specifiedEndDate == endOfSixMonthAgo) {\\n console.log(\\\"pogmatch\\\")\\n\\treturn \\\"Last 6 months\\\"\\n} else {\\n return \\\"Other\\\"\\n}\",\"value\",\"\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636494589800\",\"^D\",\"~m1636869508587\",\"^;\",\"\",\"^E\",\"\"]]],\"startValue\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"startValue\",\"^4\",\"globalwidgetoutput\",\"^5\",\"GlobalWidgetOutput\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"value\",\"{{datepicker.value.start}}\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636495086695\",\"^D\",\"~m1636867840910\",\"^;\",\"\",\"^E\",\"\"]]],\"endValue\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"endValue\",\"^4\",\"globalwidgetoutput\",\"^5\",\"GlobalWidgetOutput\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"value\",\"{{datepicker.value.end}}\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636495608324\",\"^D\",\"~m1636867846529\",\"^;\",\"\",\"^E\",\"\"]]],\"component\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"component\",\"^4\",\"globalwidgetoutput\",\"^5\",\"GlobalWidgetOutput\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"value\",\"{{datepicker}}\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636495904806\",\"^D\",\"~m1636867856211\",\"^;\",\"\",\"^E\",\"\"]]],\"datepicker\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"datepicker\",\"^4\",\"widget\",\"^5\",\"DateRangeWidget\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"minDate\",\"\",\"readOnly\",false,\"iconAfter\",\"\",\"dateFormat\",\"MMM d, yyyy\",\"hidden\",false,\"customValidation\",\"\",\"hideValidationMessage\",false,\"textBefore\",\"\",\"validationMessage\",\"\",\"textAfter\",\"\",\"showClear\",false,\"tooltipText\",\"\",\"labelAlign\",\"left\",\"value\",[\"^3\",[\"start\",\"{{startDate.value}}\",\"end\",\"{{endDate.value}}\"]],\"startPlaceholder\",\"Start date\",\"maxDate\",\"\",\"labelWidth\",\"33\",\"label\",\"\",\"formattedValue\",\"\",\"_validate\",false,\"labelWidthUnit\",\"%\",\"invalid\",false,\"iconBefore\",\"bold/interface-calendar-remove\",\"endPlaceholder\",\"End date\",\"textBetween\",\"-\",\"disabled\",false,\"labelPosition\",\"left\",\"labelWrap\",false,\"required\",false]],\"^9\",[\"^3\",[]],\"^:\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"moduleContainer\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",0,\"^>\",1,\"^?\",4,\"^@\",0]]],\"^A\",null,\"^B\",null,\"^C\",\"~m1636866885194\",\"^D\",\"~m1636867390043\",\"^;\",\"\",\"^E\",\"\"]]],\"startDate\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"startDate\",\"^4\",\"state\",\"^5\",\"State\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"value\",\"{{moment().subtract(6, \\\"months\\\")}}\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636867287791\",\"^D\",\"~m1636867413945\",\"^;\",\"\",\"^E\",\"\"]]],\"endDate\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"endDate\",\"^4\",\"state\",\"^5\",\"State\",\"^6\",null,\"^7\",null,\"^8\",[\"^3\",[\"value\",\"{{moment()}}\"]],\"^9\",null,\"^:\",null,\"^A\",null,\"^B\",null,\"^C\",\"~m1636867400064\",\"^D\",\"~m1636867539446\",\"^;\",\"\",\"^E\",\"\"]]]]],\"^C\",null,\"version\",\"2.80.13\",\"appThemeId\",null,\"preloadedAppJavaScript\",null,\"preloadedAppJSLinks\",[],\"appStyles\",\"\",\"testEntities\",[],\"tests\",[],\"responsiveLayoutDisabled\",false,\"loadingIndicatorsDisabled\",false,\"urlFragmentDefinitions\",[\"^F\",[]],\"pageLoadValueOverrides\",[\"^F\",[]],\"isGlobalWidget\",true,\"isMobileApp\",false,\"multiScreenMobileApp\",false,\"instrumentationEnabled\",false,\"customDocumentTitleEnabled\",false,\"customDocumentTitle\",\"\",\"customShortcuts\",[],\"folders\",[\"^F\",[]],\"inAppRetoolPillAppearance\",\"NO_OVERRIDE\"]]]" | |
}, | |
"changesRecord": [ | |
{ | |
"type": "DATASOURCE_TYPE_CHANGE", | |
"payload": { | |
"newType": "JavascriptQuery", | |
"pluginId": "set_last_six_months", | |
"resourceName": "JavascriptQuery" | |
} | |
}, | |
{ | |
"type": "WIDGET_TEMPLATE_UPDATE", | |
"payload": { | |
"plugin": { | |
"id": "set_last_six_months", | |
"type": "datasource", | |
"style": null, | |
"folder": "", | |
"subtype": "JavascriptQuery", | |
"tabIndex": null, | |
"template": { | |
"data": null, | |
"query": "", | |
"events": [], | |
"rawData": null, | |
"metadata": null, | |
"timestamp": 0, | |
"isFetching": false, | |
"isImported": false, | |
"cacheKeyTtl": "", | |
"transformer": "// type your code here\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\nreturn data", | |
"queryTimeout": "10000", | |
"allowedGroups": [], | |
"enableCaching": false, | |
"privateParams": [], | |
"queryDisabled": "", | |
"watchedParams": [], | |
"successMessage": "", | |
"errorTransformer": "// The variable 'data' allows you to reference the request's data in the transformer. \n// example: return data.find(element => element.isError)\nreturn data.error", | |
"queryRefreshTime": "", | |
"runWhenPageLoads": false, | |
"enableTransformer": false, | |
"queryThrottleTime": "750", | |
"queryTriggerDelay": "0", | |
"showFailureToaster": true, | |
"showSuccessToaster": true, | |
"importedQueryInputs": {}, | |
"playgroundQueryUuid": "", | |
"requireConfirmation": false, | |
"runWhenModelUpdates": false, | |
"notificationDuration": "", | |
"queryDisabledMessage": "", | |
"resourceNameOverride": "", | |
"importedQueryDefaults": {}, | |
"playgroundQuerySaveId": "latest", | |
"runWhenPageLoadsDelay": "", | |
"enableErrorTransformer": false, | |
"queryFailureConditions": "", | |
"updateSetValueDynamically": false, | |
"showLatestVersionUpdatedWarning": false, | |
"showUpdateSetValueDynamicallyToggle": true | |
}, | |
"container": "", | |
"createdAt": "2021-11-09T21:48:21.804Z", | |
"namespace": null, | |
"position2": null, | |
"updatedAt": "2021-11-14T05:58:35.488Z", | |
"resourceName": "JavascriptQuery", | |
"mobilePosition2": null, | |
"mobileAppPosition": null | |
}, | |
"update": { | |
"data": null, | |
"query": "startDate.setValue(moment().add(-5, \"month\").startOf('month').startOf('day').format(\"YYYY-MM-DD\"));\nendDate.setValue(moment().startOf('day').format(\"YYYY-MM-DD\"));", | |
"events": [], | |
"rawData": null, | |
"metadata": null, | |
"timestamp": 0, | |
"isFetching": false, | |
"isImported": false, | |
"cacheKeyTtl": "", | |
"transformer": "// type your code here\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\nreturn data", | |
"queryTimeout": "10000", | |
"allowedGroups": [], | |
"enableCaching": false, | |
"privateParams": [], | |
"queryDisabled": "", | |
"watchedParams": [], | |
"successMessage": "", | |
"errorTransformer": "// The variable 'data' allows you to reference the request's data in the transformer. \n// example: return data.find(element => element.isError)\nreturn data.error", | |
"queryRefreshTime": "", | |
"runWhenPageLoads": false, | |
"enableTransformer": false, | |
"playgroundQueryId": null, | |
"queryThrottleTime": "750", | |
"queryTriggerDelay": "0", | |
"showFailureToaster": true, | |
"showSuccessToaster": false, | |
"confirmationMessage": null, | |
"importedQueryInputs": {}, | |
"playgroundQueryUuid": "", | |
"requireConfirmation": false, | |
"runWhenModelUpdates": false, | |
"notificationDuration": "", | |
"queryDisabledMessage": "", | |
"resourceNameOverride": "", | |
"importedQueryDefaults": {}, | |
"playgroundQuerySaveId": "latest", | |
"runWhenPageLoadsDelay": "", | |
"enableErrorTransformer": false, | |
"queryFailureConditions": "", | |
"updateSetValueDynamically": false, | |
"lastReceivedFromResourceAt": null, | |
"showLatestVersionUpdatedWarning": false, | |
"showUpdateSetValueDynamicallyToggle": true | |
}, | |
"widgetId": "set_last_six_months" | |
}, | |
"isUserTriggered": true | |
} | |
], | |
"gitSha": null, | |
"checksum": null, | |
"createdAt": "2021-11-14T06:01:29.779Z", | |
"updatedAt": "2021-11-14T06:01:29.779Z", | |
"pageId": 9999, | |
"userId": 9999, | |
"branchId": null | |
}, | |
"modules": {} | |
} |
I changedd all the IDs to 999, although there shouldn't be any sensative info :P
Retool community: https://community.retool.com/t/date-range-helpers-component/7333