use of member in expressions
use of member in expressions
(OP)
Just ran across the function "member" in expressions and it looks like what I want but am not able to get it to work.
I have a string which is constructed from more than one input.
A list of possible true results is held in a list expression.
Trying to use the "member" function is always returning true so I'm missing something. Can someone clarify the use?
Below is from the help docs.
Synopsis
Defun: member(
Any, $item,
List, $List,
Name ( $key, Identity ),
Name ( $test, Equal ) )
@{...} Boolean;
Description:
Returns true if a given item is a member of a given list
$List may contain objects of any type; it does not have to be homogenous.
Input Arguments:
item - Specify an member item to search for
List - Specify a list of lists to search for the member item
key
test
Returns:
Boolean - True if the given item is a member of the given list
I have a string which is constructed from more than one input.
A list of possible true results is held in a list expression.
Trying to use the "member" function is always returning true so I'm missing something. Can someone clarify the use?
Below is from the help docs.
Synopsis
Defun: member(
Any, $item,
List, $List,
Name ( $key, Identity ),
Name ( $test, Equal ) )
@{...} Boolean;
Description:
Returns true if a given item is a member of a given list
$List may contain objects of any type; it does not have to be homogenous.
Input Arguments:
item - Specify an member item to search for
List - Specify a list of lists to search for the member item
key
test
Returns:
Boolean - True if the given item is a member of the given list
NX10.0.0.24 MP1/Windows 7 Service Pack 1





RE: use of member in expressions
If the formula and variables are put into expressions like this:
MyVariable = "K"
MyList = {"A","C","D","K","Z"}
MyResult = member(MyVariable,MyList) = 1
This works.
However, there are two options that are not included in the above example and are not explained in any documentation I can find.
Does anyone know where there is documentation that explains this function more completely?
NX10.0.0.24 MP1/Windows 7 Service Pack 1