Top Navigational Bar

Assigned Macro Variables Not Recognized By A
DocumentID: 633032
Revision Date: 29-Feb-96 3:03:09 PM

The information in this document applies to:
WordPerfect® 6.0 for DOS

Problem

Symptoms: Variables assigned in a macro were not recognized by a merge, even though the variables were declared as persistent in the macro. Solutions: WP is working as designed. The macro also declared the variables GLOBAL, after having declared them using PERSISTALL. Persistent variables are supposed to be available for macros, macro functions, and procedures and merges. Global variables are removed upon macro termination. The GLOBAL setting of the variables was overriding the PERSIST setting, so the values were never getting passed into the merge.

How/Why:
The specialist set STEP(On!) in the macro to verify that the values were being assigned properly. The specialist then set some conditions in the merge form file to test the existence of the variables and their contents. By removing the GLOBAL command, the variable values were passed in. However, the variable that was defined as a null string ("") in the macro was found to exist, but could not be checked using an IF statement to check for a "" string. This is also working as designed. (A merge expression that checks to see if a variable is not equal to "" does not work (e.g., IF(Variable(tmp) != "")).

There are no provisions in the merge language to work with null strings in a variable. If a user assigns a variable in a merge to be null string "", the variable itself will be deleted. See Folio memo 27943M in the WP60 infobase for related information.

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.