Formula ID Parameters

Variables may include additional parameters that help define its final value. Parameters are included inside the curly brackets and are separated by commas.

The first parameter is the Format Text parameter. A Format Text parameter describes how text is formatted. Formatting does not change the value of the text it formats; it instructs how such text should be displayed.

Example: {StaffingCalendarDa,yyyy-mm-dd}

Result: 2005-02-27

In the above example, "StaffingCalendarDa" is the variable and "yyyy-mm-dd" is the Format Text parameter. The second and third parameters, MidStart and MidLength, are used in conjunction with each other. These parameters are used to isolate middle text.

Example: Principal,2,4

Result: rinc

Example: {StaffingCalendarDa,yyyy-mm-dd,1,4}

Result: 2005

Example: {StaffingCalendarDa,yyyy-mm-dd,2,4}

Result: 005-

In the above example, the resulting value would have been "2005-02-27", if there were only a Format Text parameter; however, the MidStart and MidLength parameters further modified the resulting value. They limited the resulting value to 4 characters starting at the 2nd character.

The Format Text parameter is NOT required to use the MidStart and MidLength parameters. To skip the Format Text parameter, omit it and add the comma separator.

Example: {StaffingCalendarDa,,3,2}

Result: 27 (from the original text of "2/27/2005")

In the Format Text parameter, the @ symbol, when used with the ! symbol, represents right hand place holders. They isolate the right-most subtext from the original text.

The ! symbol instructs right-to-left text

Each @ symbol represents a character placeholder from the right

Example: Prinicpal,!@@@@

Result: ipal

Example: {ShiftNameCh}

Result: A Shift

Example: {ShiftNameCh!@@@@}

Result: hift

Use the ! and @ symbols (in the Format Text parameter) in conjunction with the MidStart and MidLength parameters.

Note: The Format Text parameter will evaluate the variable from right-to-left because of the ! and @ symbols, but the MidStart and MidLength parameters re-evaluate the resulting value from left-to-right.

This allows access to the middle text with orientation from right-to-left. For example, to get the 2nd, 3rd and 4th characters from the right, use the format text of "!@@@@" and the MidStart and MidLength values of 1 and 3 respectively. To access the characters 2 through 4 from the right, use four @ symbols (@@@@). To access the characters x through y (from right to left), use y number of @ symbols, Set MidStart = 1, and set MidLength = y-x+1 (e.g., {ShiftNameCh,![@Y],1,[y-x+1]} or {ShiftNameCh,!@@@@,1,3}).

Example: {ShftNameCh,! @@@@}

Result: hif

In the above example, the resulting value would have been "hift", if there were only a Format Text parameter; however, the MidStart and MidLength parameters further modified the resulting value. They limited the resulting value to 3 characters starting at the 1st character and reading from left-to-right (even though the Format Text parameter evaluated from right-to-left).