You are here: Function Reference > Alphabetical Listing > S > STR

STR

Use this function to return the string value of a field. The @ function automatically converts a numeric format field into its number value. The STR function does not convert field data in any way and returns the value as it appears in the field.

Note To consider case in the comparison, use the STRCompare function.

Syntax

STR (Field, Section, Form, Group)

Parameter

Description

Field

Enter the name the field. The default is the current field.

Section

Enter the name of a section that contains the field named. The default is the current section.

Form

Enter the name of a form that contains the section and/or field named. The default is the current form.

Group

Enter the name of the form group that contains the form, section, and/or field named. The default is the current group.

The system uses the parameters you provide to search for one field on a section and return that field’s data value as formatted. The field can have any format type.

Example

Here are some examples:

(Assume the current field value is $1,234.23 and is named MyField. Also, assume that a second occurrence of MyField appears on the form, MyForm, and contains the value automobile.)

Function

Result

Explanation

STR( )

$1,234.23

Returns the string value in the current field. Notice that the formatting of the field is not removed.

STR ("MyField")

$1,234.23

Returns the string value of the named field, located on the current section.

STR("MyField\2", , "MyForm")

automobile

The second occurrence of MyField already contained a string value.

See also