Skip to main content

Edit functions

This section describes the edit functions that you can use for calculation-formulas and edit-formulas.

Restriction

You can only use "NUMSTR", "NUMVAL", "SEI2WA", "SEI2WA1", "SEI2WA1Z", "WA2SEI", "NENGO", and "WYEAR" in Japanese form files.

String functions

Function name

Feature

AT

Retrieves numeric-type data indicating what digit position the specified string is in from the beginning, when counting half-width characters as 1 digit and full-width characters as 2 digits. If the string is located at the beginning, 1 is retrieved.

Whether full-width or half-width is determined based on the SVF-specific specification.

ATW

Retrieves numeric-type data indicating what character position the specified string is in from the beginning of the text-type data. If the string is located at the beginning, 1 is retrieved.

LEFT

Retrieves a partial string of the specified number of digits from the beginning, counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

LEFTW

Retrieves a partial string of the specified number of characters from the beginning.

LEN

Retrieves the number of digits of data as numeric-type data, when counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

LENW

Retrieves the number of characters of data as numeric-type data.

REP

Repeatedly prints a string for the specified number of times.

RIGHT

Retrieves a partial string of the specified number of digits from the end of the data, counting half-width characters as 1 digit and full-width characters as 2 digits. The last digit is 1.

Whether full-width or half-width is determined based on the SVF-specific specification.

RIGHTW

Retrieves a partial string of the specified number of characters from the end of the data. The last digit is 1.

SPC

Inserts the specified number of half-width spaces.

MID

Retrieves a partial string of the specified number of digits, starting at a specified digit from the beginning of the string, counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

MIDW

Retrieves a partial string of the specified number of characters, starting at a specified point.

REPLACE

Replaces a character or string with the specified string.

REVERSE

Reverses the string order.

Conversion functions

Function name

Feature

TOASC

Converts full-width characters into half-width characters.

TOJIS

Converts half-width characters into full-width characters.

TOLOWER

Converts uppercase alphabetical characters into lowercase.

TOUPPER

Converts lowercase alphabetical characters into uppercase.

ABS

Retrieves the absolute value as numeric-type data.

ASC

Retrieves a character as numeric-type data (decimal).

CHR

Converts decimal data into a character.

INT

Truncates fractional digits to display data as an integer.

ROUND

Rounds off numeric-type data beginning at the specified digit.

STR

Converts numeric-type data into text-type data.

VAL

Converts text-type data into numeric-type data.

NUMSTR

Converts numeric-type data into text-type data (Kanji numbers).

NUMVAL

Converts text-type data (Kanji numbers) into numeric-type data.

Date functions

Function name

Feature

DTOC

Converts date-type data (YYYYMMDD) into text-type data (YYYY/MM/DD).

DATE

Retrieves the system date.

IDATE

Retrieves the system date.

CTOD

Converts text-type data (YYYY/MM/DD) into date-type data (YYYYMMDD).

CDOW

Retrieves the name of the day of the week as text-type data from date-type data (YYYYMMDD).

ADATE

Adds (or subtracts) the specified number of days to (or from) a date, and retrieves the result as date-type data (YYYYMMDD).

YEAR

Retrieves only the Western calendar year as numeric-type data from date-type data (YYYYMMDD).

WYEAR

Retrieves only the Japanese calendar year as numeric-type data from date-type data (YYYYMMDD).

MONTH

Retrieves only the month as numeric-type data from date-type data (YYYYMMDD).

MONTH2

Retrieves only the month as text-type data from date-type data (YYYYMMDD).

DAY

Retrieves only the day as numeric-type data from date-type data (YYYYMMDD).

DOW

Calculates the day of the week from date-type data (YYYYMMDD) and retrieves the corresponding numeric-type data.

CDATE

Calculates the number of days within the period and retrieves the result as numeric-type data.

SEI2WA / SEI2WA1 / SEI2WA1Z

Converts the Western calendar date-type data to the Japanese calendar date, and retrieves the result as text-type data.

WA2SEI

Converts the Japanese calendar text-type data to the Western calendar date, and retrieves the result as date-type data.

NENGO

Retrieves the Era name of the Japanese calendar (era) from Western calendar date-type data.

Time functions

Function name

Feature

TTOC

Converts time-type data (HHMMSS) into text-type data (HH:MM:SS).

TIME

Retrieves the system time.

ITIME

Retrieves the system time.

CTOT

Converts text-type data (HH:MM:SS) into time-type data (HHMMSS).

HOUR

Retrieves only hours (HH) as numeric-type data from time-type data (HHMMSS).

MINT

Retrieves only minutes (MM) as numeric-type data from time-type data (HHMMSS).

SEC

Retrieves only seconds (SS) as numeric-type data from time-type data (HHMMSS).

Statistical functions

Function name

Feature

SUM / PSUM / RSUM / GSUM

Calculates the total value in numeric fields.

AVG / PAVG / RAVG / GAVG

Calculates the average value in numeric fields.

MIN / PMIN / RMIN / GMIN

Calculates the minimum value in text and numeric fields.

MAX / PMAX / RMAX / GMAX

Calculates the maximum value in text and numeric fields.

COUNT / PCOUNT / RCOUNT / GCOUNT

Calculates the total number of output data items in text and numeric fields.

Conditional Functions

Function name

Feature

SUM / AVG / MIN / MAX / COUNT

Calculates SUM, AVG, MIN, MAX, and COUNT using data matching the specified conditions.

Printing format functions

Function name

Feature

FORMAT / FORMAT2

Edits and prints data in the format you specified.

Other functions

Function name

Feature

SELECT

Retrieves an element from the specified display data that corresponds to the specified number.

IF

Returns the data according to the specified conditions.

PAGE

Retrieves consecutive page numbers (sequential numbers) as text-type data.

System variables

Variable name

Feature

_PAGE_CNT

Retrieves the page number (sequential number) for a page break unit that occurs due to a key break as numeric-type data.

_PREV_P

Used to determine whether a page break unit that occurs due to a key break is the first page.

_NEXT_P

Used to determine whether a page break unit that occurs due to a key break is the last page.

_PAGE_GROUP_COUNT

Retrieves the group sequential number of the page as numeric-type data.

_TOTAL_PAGE_COUNT

Retrieves the total number of pages as numeric-type data.

_TOTAL_PAGE_CNT

Retrieves the total number of pages for each key break as numeric-type data.

_SERIAL_PAGE_COUNT

Retrieves the report sequential number between the VrInit and VrQuit functions as numeric data.

Global variables

Variable name

Feature

$<global_variable_name>$

You can define and use this as parameter value of valid text-type data between the VrInit and VrQuit functions.