Command Reference : Function Reference : Function Reference: W
  
 
@wfattrnames
 
Syntax: @wfattrnames(attr[, obj, page, opt])
attr: string
obj: (optional) string
page: (optional) string
opt: (optional) integer
Return: string
Returns a string list of all attribute names that match the attr pattern in the specified page list or active page and, optionally, whose object names also match the obj name pattern.
The attr is a space delimited list of attribute name patterns. The list may be made up of any number of names, or “?” (indicates any single character) or “*” (indicates any number of characters) patterns.
The obj list may be made up of any number of names, or “?” (indicates any single character) or “*” (indicates any number of characters) patterns separated by spaces.
The page list may be made up of any number of workfile page names, or “?” (indicates any single character) or “*” (indicates any number of characters) patterns separated by spaces. If a page list is not specified, only the active workfile page will be used.
The opt is an integer value indicating how a “*” or “?” in the attr should be treated when matching. Use “0” to treat the characters as wildcards, and “1” to treat the characters as literals.
Matches are not case-sensitive.
Examples
If a workfile contains three pages named “PAGE1”, “PAGE2”, and “PAGE3”,
@wfattrnames("M*")
returns the list of attributes for the objects in the active page that begin with “M”. Alternatively,
@wfattrnames("M* S*", "*", "page1 page2")
returns the list of attributes for all the objects on PAGE1 and PAGE2 that begin with “M” and “S”.
If an object on PAGE1 had an attribute named “*Note” and another object on the same page had an attribute named “footnote” the command
@wfattrnames("*NOTE", "*", "page1")
will return “*Note footnote” since the “*” in “*Note” is treated as a wildcard. However, the command
@wfattrnames("*NOTE", "*", "page1", 1)
will return “*Note”, since the “*” in “*Note” is treated as a literal.
Cross-references
See also @attrnames, @attrvals, and @wfattrvals.