Exists
Last updated
Last updated
© Copyright 2023, Astera Software
Name
Exists
Syntax
Exists (String lookFor, String lookIn)
Purpose
To check whether a string exists within a comma separated string.
Description
Returns true if value 1 exists in value2, where value 2 is a comma separated list. Otherwise returns false.
Return Type
Boolean
Parameters
lookFor [System.String] – String to look for
lookIn [System.String] – A comma separated list of items that should be searched
In this example, we are passing the required parameters to the function transformation object using a Variables object.
Where,
LookFor = C
LookIn = A,B,C,D,E,F,G
Right-click on the function transformation object and select Preview Output. You can see that Astera Data Stack has returned the Boolean value, True, indicating that the LookFor value exists in the comma separated LookIn string.
Conversely, if we replace the lookFor value with “3”, you can see that Astera Data Stack has returned the Boolean value, False.