|Contents:||Main||Chapter||See Also:||Getting Started Manual||Programmer Manual|
When you are working with file data in computed expressions, you must consider the appropriateness of the DATA TYPE of the field for the operation or function you are using. Here are some notes regarding Data Types and computed expressions:
These Data Types are manipulated using the external representations, not the internal ones. (The internal value can be accessed using the INTERNAL function.)
The DATE/TIME Data Type usually yields results based on the internal value of the field when used in a computed expression. For example, the computed expression "DATE OF BIRTH: "_DOB, where DOB is a field with a DATE/TIME Data Type, yields "DATE OF BIRTH: 2910713", where 2910713 is the internal representation of the date.
Often, you do not want the internal representation of the date to be used for output. There are alternatives. Continuing with concatenation as an example, you can concatenate a caption with the output of a function (e.g., "DATE OF BIRTH: "_NUMDATE(DOB) yields "DATE OF BIRTH: 07/13/91"). When using the Print File Entries option, you can separately identify the caption like this:
FIRST PRINT FIELD: "DATE OF BIRTH: " THEN PRINT FIELD: DOB;X
Since DOB was not entered as part of a computed expression, it will produce output in VA FileMan's external date format: "DATE OF BIRTH: JUL 13, 1991".
You can perform certain arithmetic operations with DATE/TIME Data Types that directly yield useful results:
WORD-PROCESSING Data Type fields can be manipulated only with the contains ("[") operator (e.g., a valid computed expression within the DIAGNOSIS Multiple of our sample PATIENT file is: HISTORY["poverty"). This Boolean expression is true, if the DIAGNOSIS in question has HISTORY text that contains the string "poverty".
Also, you cannot concatenate WORD-PROCESSING-type fields with other values using the concatenation ("_") operator.
Reviewed/Updated: March 4, 2007