Calculate the number of bytes when a character string is represented by the specified character code.
To set the result of the calculation to another field, enter the target field into the parameter “Target Field (Optional)”.
Use formulas when using the result for other actions without setting it immediately.
For example, if the action of “Calculate String Bytes” is the first action, set the value in the parameter “Set Field Value” as follows:
=$1
By specifying it like this, you can extract it.
Set String, Character Code, and Target Field (Optional).
Specify the string for which you want to calculate the byte size. You can specify both directly and by expression.
To specify the value of the field, use an expression as shown in the example below.
=Text_1_1
When specified in the formula, the entire string will be subject to calculation. For example, if it is the value in a rich editor, HTML tags will also be included in the calculation.
If the string contains control characters, such as newline codes, they are included in the byte count.
Specify which character code to use when counting the number of bytes.
Use this parameter to set the results to another field. You can omit this parameter if you do not set the results directly in the field but use it in another action.
This parameter accepts the following field types:
If you select a field inside a table, all rows of that table will be processed. For exceptions: See (*1)
*1: If you set a Condition that only applies to some table rows (such as the Condition “When Fields Value Changed”), the value will be set only for those affected by that Condition.
This action is designed to work seamlessly with krewSheet.
However, the following restrictions apply to the parameter “Target Field (Optional)”:
Character encodings other than Shift-JIS and UTF-8 are not supported.
When Shift-JIS is selected for “Character Code”, there is a possibility that the “String” contains characters that cannot be represented in Shift-JIS. For example, emojis cannot be represented in Shift-JIS. The specification does not guarantee the result of byte count calculation for characters that cannot be represented in Shift-JIS.