Command Reference : Function Reference : Function Reference: W
  
 
@wfattrvals
 
Syntax: @wfattrvals(attr[, obj, page, opt])
attr: string
obj: (optional) string
page: (optional) string
opt: (optional) integer
Return: string
Returns a string list of all attribute values 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 value 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”, then
@wfattrvals("M*", "*", "PAGE1")
return the string list of all attribute values that begin with “M” on PAGE1. Alternatively,
@wfattrvals("M* D*", "GDP", "PAGE1 PAGE2")
returns the list of attribute values for the objects PAGE1/GDP and PAGE2/GDP that begin with “M” and “D”.
If on PAGE1 there was an object that had one attribute value of “*Mar” and second attribute value of “Mar”, the command
@wfattrvals("*mar", "*", "PAGE1")
will return “*mar mar” since the “*” in “*mar” is treated as a wildcard and the values “Mar” and “*Mar” both match the attribute list. However, the command
@wfattrvals("*mar", "*", "PAGE1", 1)
will only return “*mar”, since the “*” in “*Mar” is treated as a literal and only “*Mar” matches the list.
Cross-references
See also @attrnames, @attrvals, and @wfattrnames.