The State macro is used to insert US state names into the strings generated by a data source using the Custom String data generator.
The macro is an analog of the State data generator.
Syntax
The macro has the following syntax:
%STATE(Format)
Parameters
Format
Specifies the format of state names to be generated:
-
FULL
– Default. The macro generates full state names – for example,Florida
,Texas
, and so on. -
Abbreviated
– The macro generates abbreviated state names – for example,FL
,TX
, and so on.
![]() |
The values are case-insensitive. |
Examples
The following example demonstrates how to use the State macro:
-
State: %STATE(FULL)
Generates a string containing a full state name.
-
%STATE(Abbreviated)
Generates abbreviated state names.
-
%STATE <- Invalid value
The macro requires the parameter, so ReadyAPI will not parse the custom string.
-
%STATE(COUNTY) <— Invalid value
The parameter is specified incorrectly, so ReadyAPI will not parse the custom string.
Remarks
For more information on adding macros to custom strings, see About Custom String Generator.
For more information on general rules used for specifying macro parameters, see Custom String Generator Rules.