### app.record.index.edit.show - Upon starting editing operation Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html This event fires when an editing operation is started on the record view. The source text does not provide detailed information about this event. ```APIDOC ## Event - Upon starting editing operation ### Description This event fires when an editing operation is started on the record view. The source text does not provide detailed information about this event. ### Event Type app.record.index.edit.show ### Timing of Event Firing Not specified in the source. ### Event Object Property Not specified in the source. ### Control Depending on Field value Not specified in the source. ``` -------------------------------- ### app.record.index.edit.show Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html This event fires when editing of krewSheet is started. It provides access to the record data at the time editing began. ```APIDOC ## Event: app.record.index.edit.show ### Description This event fires when editing of krewSheet is started. ### Event Type app.record.index.edit.show ### Event Object Properties - **appId** (Number) - App ID - **record** (Object) - Record objects retaining the data at the time when editing was started - **recordId** (Number) - Record ID - **type** (String) - Event type ### Control Depending on Field Value This function isn't available. ``` -------------------------------- ### Redirect after successful save using app.record.index.edit.submit.success Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html This snippet shows how to set the url property in the event object for the app.record.index.edit.submit.success event to redirect to a specified URL after a successful save. If the url property is not specified or is null, the screen remains unchanged. The example redirects to https://krew.mescius.com/. ```javascript // After a successful save operation, it will move to https://krew.mescius.com/.Kintone.events.on("app.record.index.show," function(e) { krewSheet.events.on('app.record.index.edit.submit.success," function (event) { event.url = "https://krew.mescius.com/"; console.log("url: " + event.url); return event; }); }); ``` -------------------------------- ### WORKDAY.INTL Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the serial number of the date before or after a specified number of workdays from a start date using a parameter that indicates which and how many days are weekend days. ```APIDOC ## WORKDAY.INTL ### Description Returns the serial number of the date before or after a specified number of workdays from a start date using a parameter that indicates which and how many days are weekend days. ### Function WORKDAY.INTL ### Parameters - **start_date** (number/DateTime) - Required - The start date. - **days** (number) - Required - The number of workdays before or after start_date. - **weekend** (number/string) - Optional - A number or string that specifies which days are weekend days. - **holidays** (array) - Optional - A list of dates to exclude from the workday calendar. ### Return Value - **number** - The serial number of the resulting date. ``` -------------------------------- ### WORKDAY Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the total number of workdays (= days excluding Saturday, Sunday, and specified holidays) to the date that is the specified number of days before (-) or after (+) a specified start date (number/DateTime object). ```APIDOC ## WORKDAY ### Description Returns the total number of workdays (= days excluding Saturday, Sunday, and specified holidays) to the date that is the specified number of days before (-) or after (+) a specified start date (number/DateTime object). ### Function WORKDAY ### Parameters - **start_date** (number/DateTime) - Required - The start date. - **days** (number) - Required - The number of workdays before or after start_date. - **holidays** (array) - Optional - A list of dates to exclude from the workday calendar. ### Return Value - **DateTime** - The resulting date. ``` -------------------------------- ### app.record.index.edit.change. Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html This event fires when the field value becomes modified. The modification of the value which triggered the event won't be canceled. If a Kintone.Promise object is returned, event processing starts upon the completion of asynchronous processing. ```APIDOC ## Event: app.record.index.edit.change. ### Description This event fires when the field value becomes modified. The modification of the value which triggered the event won't be canceled. If a Kintone.Promise object is returned, event processing starts upon the completion of asynchronous processing. ### Event Type app.record.index.edit.change. ### Fields That Can be Specified in Field Code Handler can be performed only in the following situations: when field codes present in are specified; and the field types such as those shown below are specified. If any fields that aren't present in or field types other than those shown below are specified, no event will occur. - Radio Button - Drop-down - Check box - Multiple-choice - User selection - Department Selection - Group selection - Date - Time - Date and time - Text (single-row) - Number - Table *For Text (single-row) and Number fields, event fires at the following timing: - When modified cell is moved *For Table field, event fires at the following timing: - When table rows are added and when the [Delete Row] button is clicked. ### Event Object Properties - **appId** (Number) - App ID - **record** (Object) - Record object retaining the data input by user when event is fired - **recordId** (Number) - Record ID - **changes** (Object) - Changed object - **changes.field** (Object) - Changed Field object - **type** (String) - Event type ### Control Depending on Field Value - Rewrite the field value - Obtain changed fields and row objects in tables ``` -------------------------------- ### Sample: Display update time after saving record Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Sample program that displays the time and date of update after saving a record. It uses krewSheet events and alerts the value of the 'time and date of update' field for each record. ```javascript // Display the time and date of update after saving the record Kintone.events.on('app.record.index.show," function(e) { krewSheet.events.on('app.record.index.edit.submit.success," function (event) { var records = event.records; for(let i=0; i - app.record.index.delete.submit ``` -------------------------------- ### krewsheet.events.on(event, handler(event)) Source: https://krew.mescius.com/docs/online-krewsheet/event_handling.html Registers an event handler for a specified event type. The handler is called when the event occurs. ```APIDOC ## krewsheet.events.on(event, handler(event)) ### Description Registers an event handler for a specified event type. The handler is called when the event occurs. ### Method on ### Parameters - **event** (String or String array) - Required - Specify the event type or an array of event types to register the event handler. - **handler(event)** (Function(Object)) - Required - Event handler to be registered. The event object is passed as an argument. ### Return Value Not available. ### Request Example ```javascript // Execute the registration of event handler var handler = function(event) { console.log(event); }; kintone.events.on('app.record.index.show', function(event) { krewsheet.events.on('app.record.index.show', handler); }); ``` ### Notes - In krewSheet, the event handlers are registered after the krewSheet is loaded. Therefore, please register after kintone's record view screen is displayed. ``` -------------------------------- ### Delete submit event with Kintone.Promise Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Sample program for krewSheet delete submit event using Kintone.Promise to check company name existence. Sets event.error if no matching record found. ```javascript Kintone.events.on('app.record.index.show," function(event) { krewSheet.events.on('app.record.index.delete.submit," function (event) { var records = event.records; var companyName = records[0]['Company name'].value; // Confirm that company name exists in company master var masterAppId = 923; var query = 'Company name_="' + companyName + '"'; return new Kintone.Promise(function(resolve, reject) { var params = {app: masterAppId, query: query}; Kintone.api('/k/v1/records," 'GET," params, function(resp) { resolve(resp); }); }).then(function(resp) { if (!resp.records.length) { event.error = 'It can't be deleted because there is no Company name '; } return event; }); }); }); ``` -------------------------------- ### SUM Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the total of a set of numbers. ```APIDOC ## SUM ### Description Returns the total of the specified numbers. ### Function SUM ### Parameters - **number1** (number) - Required - The first number to add. - **number2** (number) - Optional - Additional numbers to add. ### Return Value - **number** - The sum of the numbers. ``` -------------------------------- ### app.record.index.edit.submit.success - After successfully performing the save operation Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html This event fires after the record has been successfully saved on the server. It fires only once when multiple records are saved simultaneously. You can specify a URL property to redirect after the event. ```APIDOC ## Event - After the Save Operation Is Performed ### Description This event fires after the record has been successfully saved on the server. This event fires only once when multiple records are saved simultaneously. If saving fails, event isn't executed. Multiple records can be obtained only from the data changed by the Records property of the event object. If a Kintone.Promise object is returned, event processing starts upon the completion of asynchronous processing. ### Event Type app.record.index.edit.submit.success ### Timing of Event Firing - When record is successfully saved on server side ### Event Object Property | Property Name | Type | Description | |---------------|------|-------------| | appId | Number | App ID | | recordIds | Array | Array of Record IDs | | records | Array | Array of record objects retaining the user input data | | type | String | Event type | ### Specifying Url Property If the event is returned after specifying the url property in an event object, it will move to the URL concerned after event processing. If the URL property isn't specified or Null is specified, it won't move and remain unchanged as a record view. For example, if it's described as shown below, the screen will change to "https://krew.mescius.com/" after a successful save. #### Sample Program ``` // After a successful save operation, it will move to https://krew.mescius.com/. Kintone.events.on("app.record.index.show," function(e) { krewSheet.events.on('app.record.index.edit.submit.success," function (event) { event.url = "https://krew.mescius.com/"; console.log("url: " + event.url); return event; }); }); ``` ### Control Depending on Field value This function isn't available. ``` -------------------------------- ### VDB Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the depreciation of an asset for any specified period using the double-declining balance method. ```APIDOC ## VDB ### Description Returns the depreciation of an asset for any specified period using the double-declining balance method. ### Function VDB ### Parameters - **cost** (number) - Required - The initial cost of the asset. - **salvage** (number) - Required - The value at the end of the depreciation. - **life** (number) - Required - The number of periods over which the asset is depreciated. - **start_period** (number) - Required - The starting period for which you want the depreciation. - **end_period** (number) - Required - The ending period for which you want the depreciation. - **factor** (number) - Optional - The rate at which the balance declines. If omitted, it is assumed to be 2 (double-declining). - **no_switch** (logical) - Optional - A logical value specifying whether to switch to straight-line depreciation when depreciation is greater than the declining balance. ### Return Value - **number** - The depreciation amount. ``` -------------------------------- ### TBILLEQ Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the bond-equivalent yield for a Treasury Bill (TB). ```APIDOC ## TBILLEQ ### Description Returns the bond-equivalent yield for a Treasury Bill (TB). ### Function TBILLEQ ### Parameters - **settlement** (date) - Required - The settlement date. - **maturity** (date) - Required - The maturity date. - **discount** (number) - Required - The discount rate. ### Return Value - **number** - The bond-equivalent yield. ``` -------------------------------- ### SUBTOTAL Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns a subtotal using a specified aggregation method. ```APIDOC ## SUBTOTAL ### Description Returns a subtotal. You can select an aggregation method, such as total, average, and count. ### Function SUBTOTAL ### Parameters - **function_num** (number) - Required - A number that specifies the aggregation function to use (e.g., 1 for AVERAGE, 9 for SUM). - **ref1** (range) - Required - The first range or reference to include in the subtotal. - **ref2** (range) - Optional - Additional ranges or references. ### Return Value - **number** - The subtotal result. ``` -------------------------------- ### TRANSPOSE Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns an array made by swapping rows and columns in a specified cell range. ```APIDOC ## TRANSPOSE ### Description Returns an array made by swapping rows and columns in a specified cell range. ### Function TRANSPOSE ### Parameters - **array** (range) - Required - The range to transpose. ### Return Value - **array** - The transposed array. ``` -------------------------------- ### SUMPRODUCT Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Sums up the products of corresponding elements in specified two arrays. ```APIDOC ## SUMPRODUCT ### Description Sums up the products of corresponding elements in specified two arrays. ### Function SUMPRODUCT ### Parameters - **array1** (array) - Required - The first array. - **array2** (array) - Required - The second array. - **array3** (array) - Optional - Additional arrays. ### Return Value - **number** - The sum of the products. ``` -------------------------------- ### SUMIFS Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Sums up the values of cells that satisfy specified conditions. ```APIDOC ## SUMIFS ### Description Sums up the values of cells that satisfy specified conditions. ### Function SUMIFS ### Parameters - **sum_range** (range) - Required - The range of cells to sum. - **criteria_range1** (range) - Required - The first range to evaluate. - **criteria1** (string/number) - Required - The condition for criteria_range1. - **criteria_range2** (range) - Optional - Additional ranges and criteria. - **criteria2** (string/number) - Optional - Additional conditions. ### Return Value - **number** - The sum of the cells that meet all conditions. ``` -------------------------------- ### VALUE Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Converts a specified string (that represents a number) to a number. ```APIDOC ## VALUE ### Description Converts a specified string (that represents a number) to a number. ### Function VALUE ### Parameters - **text** (string) - Required - The string to convert. ### Return Value - **number** - The numeric value. ``` -------------------------------- ### T Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Converts a specified cell to a string. ```APIDOC ## T ### Description Converts a specified cell to a string. ### Function T ### Parameters - **value** (any) - Required - The value to convert. ### Return Value - **string** - The string representation of the value. ``` -------------------------------- ### Delete submit event without Kintone.Promise (return false) Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Sample program for krewSheet delete submit event without using Kintone.Promise. Returns false if the first record has no address. ```javascript Kintone.events.on("app.record.index.show," function(e) { krewSheet.events.on('app.record.index.delete.submit," function (event) { var records = event.records; // If there is no address, it returns false if (!records[0]['Address']['value']) { return false; } return event; }); }); ``` -------------------------------- ### TYPE Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the data type of a value (1 = Number/DateTime/TimeSpan, 2 = Text, 4 = Boolean, 16 = Error, 64 = Array). ```APIDOC ## TYPE ### Description Returns the data type of a value (1 = Number/DateTime/TimeSpan, 2 = Text, 4 = Boolean, 16 = Error, 64 = Array). ### Function TYPE ### Parameters - **value** (any) - Required - The value to check. ### Return Value - **number** - The data type code. ``` -------------------------------- ### XIRR Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the internal rate of return based on an irregular cash flow. ```APIDOC ## XIRR ### Description Returns the internal rate of return based on an irregular cash flow. ### Function XIRR ### Parameters - **values** (array) - Required - The array of cash flows. - **dates** (array) - Required - The array of dates corresponding to the cash flows. - **guess** (number) - Optional - An initial guess for the rate of return. ### Return Value - **number** - The internal rate of return. ``` -------------------------------- ### SUMSQ Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the sum of squares (= square sum). ```APIDOC ## SUMSQ ### Description Returns the sum of squares (= square sum) of the specified numbers. ### Function SUMSQ ### Parameters - **number1** (number) - Required - The first number. - **number2** (number) - Optional - Additional numbers. ### Return Value - **number** - The sum of squares. ``` -------------------------------- ### SUMIF Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Sums up the values of cells that satisfy a specified condition. ```APIDOC ## SUMIF ### Description Sums up the values of cells that satisfy a specified condition. ### Function SUMIF ### Parameters - **range** (range) - Required - The range of cells to evaluate. - **criteria** (string/number) - Required - The condition that determines which cells to sum. - **sum_range** (range) - Optional - The actual cells to sum. If omitted, the cells in range are summed. ### Return Value - **number** - The sum of the cells that meet the condition. ``` -------------------------------- ### Delete submit event without Kintone.Promise (error) Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Sample program for krewSheet delete submit event without using Kintone.Promise. Sets event.error if the first record has no address. ```javascript Kintone.events.on("app.record.index.show," function(e) { krewSheet.events.on('app.record.index.delete.submit," function (event) { var records = event.records; if (!records[0]['Address']['value']) { event.error = 'It can't be deleted because there is no address '; } return event; }); }); ``` -------------------------------- ### WEEKDAY Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the day of the week for a date specified by a number/string/DateTime object. ```APIDOC ## WEEKDAY ### Description Returns the day of the week for a date specified by a number/string/DateTime object. ### Function WEEKDAY ### Parameters - **serial_number** (number/string/DateTime) - Required - The date. - **return_type** (number) - Optional - A number that determines the type of return value (e.g., 1 for Sunday=1, 2 for Monday=1, etc.). ### Return Value - **number** - The day of the week. ``` -------------------------------- ### VARPA Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the variance (= sample variance) of a population, supposing that data (= number/text/logical value) in specified values is an entire population. ```APIDOC ## VARPA ### Description Returns the variance (= sample variance) of a population, supposing that data (= number/text/logical value) in specified values is an entire population. ### Function VARPA ### Parameters - **value1** (any) - Required - The first value. - **value2** (any) - Optional - Additional values. ### Return Value - **number** - The variance. ``` -------------------------------- ### TBILLYIELD Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the yield for a Treasury Bill (TB). ```APIDOC ## TBILLYIELD ### Description Returns the yield for a Treasury Bill (TB). ### Function TBILLYIELD ### Parameters - **settlement** (date) - Required - The settlement date. - **maturity** (date) - Required - The maturity date. - **price** (number) - Required - The price per $100 par value. ### Return Value - **number** - The yield. ``` -------------------------------- ### TBILLPRICE Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the price per $100 par value for a Treasury Bill (TB). ```APIDOC ## TBILLPRICE ### Description Returns the price per $100 par value for a Treasury Bill (TB). ### Function TBILLPRICE ### Parameters - **settlement** (date) - Required - The settlement date. - **maturity** (date) - Required - The maturity date. - **discount** (number) - Required - The discount rate. ### Return Value - **number** - The price per $100 par value. ``` -------------------------------- ### SUMXMY2 Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Sums up the squared differences of corresponding elements in specified two arrays. ```APIDOC ## SUMXMY2 ### Description Sums up the squared differences of corresponding elements in specified two arrays. ### Function SUMXMY2 ### Parameters - **array_x** (array) - Required - The first array. - **array_y** (array) - Required - The second array. ### Return Value - **number** - The sum of the squared differences. ``` -------------------------------- ### krewSheet.events.on('app.record.index.edit.change.') Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Event handler for when a field value changes on the record list screen. The changed field can be obtained from event.changes.field. ```APIDOC ## krewSheet.events.on('app.record.index.edit.change.') ### Description Event handler for when a field value changes on the record list screen. The changed field can be obtained from `event.changes.field`. ### Method Event registration ### Event Name `app.record.index.edit.change.` ### Parameters #### Event Object - **changes** (Object) - Contains information about the changed field. - **changes.field** (Object) - The changed field object. ### Request Example ```javascript Kintone.events.on('app.record.index.show', function(event) { krewSheet.events.on('app.record.index.edit.change.Drop-down', function(event) { var field = event.changes.field; console.log(field); return event; }); }); ``` ### Response #### Success Response Returns the event object. #### Response Example ```javascript { changes: { field: { /* changed field object */ } } } ``` ``` -------------------------------- ### TINV Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the inverse function value of the Student's t distribution. ```APIDOC ## TINV ### Description Returns the inverse function value of the Student's t distribution. ### Function TINV ### Parameters - **probability** (number) - Required - The probability. - **deg_freedom** (number) - Required - The degrees of freedom. ### Return Value - **number** - The inverse t value. ``` -------------------------------- ### Obtain changed field on drop-down change Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Use the app.record.index.edit.change.Drop-down event to access the changed field via event.changes.field and log it to the console. ```javascript Kintone.events.on('app.record.index.show," function(event) { krewSheet.events.on('app.record.index.edit.change.Drop-down," function(event) { var field = event.changes.field; console.log(field); return event; }); }); ``` -------------------------------- ### WEIBULL Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Statistical function. Returns the value of the Weibull distribution. ```APIDOC ## WEIBULL ### Description Statistical function. Returns the value of the Weibull distribution. ### Function WEIBULL ### Parameters - **x** (number) - Required - The value at which to evaluate the distribution. - **alpha** (number) - Required - The alpha parameter. - **beta** (number) - Required - The beta parameter. - **cumulative** (logical) - Required - A logical value that determines the form of the function (TRUE for cumulative distribution, FALSE for probability density). ### Return Value - **number** - The distribution value. ``` -------------------------------- ### app.record.index.edit.submit - Before executing save operation Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html This event fires when records are saved, before the save operation is executed. It fires only once when multiple records are saved simultaneously. You can rewrite field values or display errors in records. ```APIDOC ## Event - Before Executing the Save Operation ### Description This event fires when records are saved. It fires only once when multiple records are saved simultaneously. Multiple records can be obtained only from the data changed by the Records property of the event object. If a Kintone.Promise object is returned, event processing starts upon the completion of asynchronous processing. ### Event Type app.record.index.edit.submit ### Firing Time - When the Save button on the command bar is clicked - When "Save selected row" of the context menu is selected - When "Save formula" of the context menu is selected ### Event Object Property | Property Name | Type | Description | |---------------|------|-------------| | appId | Number | App ID | | recordIds | Array | Array of Record IDs | | records | Array | Array of record objects retaining the user input data | | type | String | Event type | ### Control Depending on Field value - Display error in record - Rewrite the field value ``` -------------------------------- ### krewSheet.events.on('app.record.index.edit.submit') Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Event handler for before executing save operation on the record list screen. Assigning an error message to event.records[0]['error'] cancels the rewriting operation and displays the error in the row header. ```APIDOC ## krewSheet.events.on('app.record.index.edit.submit') ### Description Event handler for before executing save operation on the record list screen. Assigning an error message to `event.records[0]['error']` cancels the rewriting operation and displays the error in the row header. ### Method Event registration ### Event Name `app.record.index.edit.submit` ### Parameters #### Event Object - **records** (Array) - Array of record objects. Multiple records can be saved simultaneously. - **records[0].error** (String) - Error message to display in the row header. ### Request Example ```javascript Kintone.events.on('app.record.index.show', function(event) { krewSheet.events.on('app.record.index.edit.submit', function (event) { event.records[0]['error'] = 'Show this error message'; return event; }); }); ``` ### Response #### Success Response Returns the event object with the error message set. #### Response Example ```javascript { records: [ { error: 'Show this error message' } ] } ``` ``` -------------------------------- ### SYD Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the depreciation of an asset for a specified period using the sum-of-the-years' digits method. ```APIDOC ## SYD ### Description Returns the depreciation of an asset for a specified period using the sum-of-the-years' digits method. ### Function SYD ### Parameters - **cost** (number) - Required - The initial cost of the asset. - **salvage** (number) - Required - The value at the end of the depreciation. - **life** (number) - Required - The number of periods over which the asset is depreciated. - **per** (number) - Required - The period for which you want the depreciation. ### Return Value - **number** - The depreciation amount. ``` -------------------------------- ### Deleting all event handlers Source: https://krew.mescius.com/docs/online-krewsheet/event_handling.html Deletes all event handlers that were registered. ```APIDOC ## Deleting all event handlers ### Description Deletes all event handlers that were registered. ### Function Not explicitly provided in the source. ### Return value Not explicitly provided in the source. ``` -------------------------------- ### SUMX2MY2 Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Sums up the square differences of corresponding elements in specified two arrays. ```APIDOC ## SUMX2MY2 ### Description Sums up the square differences of corresponding elements in specified two arrays. ### Function SUMX2MY2 ### Parameters - **array_x** (array) - Required - The first array. - **array_y** (array) - Required - The second array. ### Return Value - **number** - The sum of the square differences. ``` -------------------------------- ### SUMX2PY2 Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Sums up the square sums of corresponding elements in specified two arrays. ```APIDOC ## SUMX2PY2 ### Description Sums up the square sums of corresponding elements in specified two arrays. ### Function SUMX2PY2 ### Parameters - **array_x** (array) - Required - The first array. - **array_y** (array) - Required - The second array. ### Return Value - **number** - The sum of the square sums. ``` -------------------------------- ### TRIMMEAN Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the average of middle data values which excludes upper and lower data values in a data set. ```APIDOC ## TRIMMEAN ### Description Returns the average of middle data values which excludes upper and lower data values in a data set. ### Function TRIMMEAN ### Parameters - **array** (array) - Required - The array of values. - **percent** (number) - Required - The fraction of data points to exclude from the top and bottom. ### Return Value - **number** - The trimmed mean. ``` -------------------------------- ### VAR Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Statistical function. Returns the estimated variance (= unbiased variance) of a population based on a sample. ```APIDOC ## VAR ### Description Statistical function. Returns the estimated variance (= unbiased variance) of a population based on a sample, supposing that a set of numbers in a specified array or values is a sample of a normal population. ### Function VAR ### Parameters - **number1** (number) - Required - The first number. - **number2** (number) - Optional - Additional numbers. ### Return Value - **number** - The estimated variance. ``` -------------------------------- ### TAN Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the tangent of a specified angle. ```APIDOC ## TAN ### Description Returns the tangent of a specified angle. ### Function TAN ### Parameters - **number** (number) - Required - The angle in radians. ### Return Value - **number** - The tangent of the angle. ``` -------------------------------- ### TREND Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns an array of predicted values on a regression line. ```APIDOC ## TREND ### Description Returns an array of predicted values on a regression line. ### Function TREND ### Parameters - **known_y's** (array) - Required - The known y-values. - **known_x's** (array) - Optional - The known x-values. - **new_x's** (array) - Optional - The new x-values for which to predict. - **const** (logical) - Optional - A logical value specifying whether to force the intercept to be zero. ### Return Value - **array** - The predicted values. ``` -------------------------------- ### TIMEVALUE Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns a TimeSpan object representing the time specified by a string. ```APIDOC ## TIMEVALUE ### Description Returns a TimeSpan object representing the time specified by a string. ### Function TIMEVALUE ### Parameters - **time_text** (string) - Required - A string that represents a time. ### Return Value - **TimeSpan** - The TimeSpan object. ``` -------------------------------- ### WEEKNUM Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Returns the week number in a year for a date specified by a number/string/DateTime object. ```APIDOC ## WEEKNUM ### Description Returns the week number in a year for a date specified by a number/string/DateTime object. ### Function WEEKNUM ### Parameters - **serial_number** (number/string/DateTime) - Required - The date. - **return_type** (number) - Optional - A number that determines the starting day of the week (e.g., 1 for Sunday, 2 for Monday). ### Return Value - **number** - The week number. ``` -------------------------------- ### krewsheet.events.off() Source: https://krew.mescius.com/docs/online-krewsheet/event_handling.html Deletes all event handlers. Returns true if at least one handler is deleted, false otherwise. ```APIDOC ## krewsheet.events.off() ### Description Deletes all event handlers. Returns true if at least one handler is deleted, false otherwise. ### Method off ### Parameters None. ### Return Value - true: If at least one event handler is deleted successfully. - false: If no event handlers to be deleted are found. ``` -------------------------------- ### Rewrite field value on field change Source: https://krew.mescius.com/docs/online-krewsheet/event_recordlist.html Sample program for krewSheet event that rewrites field values when a drop-down field changes. Sets a default value and updates a subtable field. ```javascript // At the time of field value change of "Drop-down_0," set "Text __1row" field as default value in "Text__1row__2" field of "Activity history" Kintone.events.on("app.record.index.show," function(e) { krewSheet.events.on('app.record.index.edit.change. Drop-down _0," function (event) { var record = event.record; record['Text __1row_']['value'] = 'Overwrite on this string '; record['Activity history']['value'][0]['value']['Text__1row__2']['value'] = 'Overwrite first record in subtable'; return event; }); }); ``` -------------------------------- ### TRUNC Source: https://krew.mescius.com/docs/online-krewsheet/formulafunctions.html Truncates a number by removing the fractional part of it. ```APIDOC ## TRUNC ### Description Truncates a number by removing the fractional part of it. ### Function TRUNC ### Parameters - **number** (number) - Required - The number to truncate. - **num_digits** (number) - Optional - The number of decimal places to keep. If omitted, the integer part is returned. ### Return Value - **number** - The truncated number. ```