GetContextKeywords PowerScript function
Description
Retrieves one or more values associated with a specified keyword.
Controls
ContextKeyword objects
Syntax
|
1 |
<span>servicereference</span>.<span>GetContextKeywords</span> ( <span>name</span>, <span>values</span> ) |
|
Argument |
Description |
|---|---|
|
servicereference |
Reference to the ContextKeyword service |
|
name |
String specifying the keyword for which |
|
values |
Unbounded String array into which the |
Return Values
Integer. Returns the number of elements
in values if the function succeeds and -1 if
an error occurs.
Usage
Call this function to access environment variables.
This function can also be used with a PowerBuilder EAServer component to return
the value of a specific property from the component’s .props file.
To enumerate the properties of an EAServer component,
use the Jaguar::Repository API.
Examples
This example calls the GetContextKeywords function:
|
1 |
String ls_keyword |
|
1 |
Integer li_count, li_return |
|
1 |
ContextKeyword lcx_key |
|
1 |
|
1 |
li_return = this.GetContextService & |
|
1 |
("ContextKeyword", lcx_key) |
|
1 |
ls_keyword = sle_name.Text |
|
1 |
lcx_key.<span>GetContextKeywords</span> & |
|
1 |
(ls_keyword, is_values) |
|
1 |
FOR li_count = 1 to UpperBound(is_values) |
|
1 |
lb_parms.AddItem(is_values[li_count]) |
|
1 |
NEXT |