# Exists

| **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  | <p>lookFor \[System.String] – String to look for</p><p>lookIn \[System.String] – A comma separated list of items that should be searched</p> |

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/0%20\(207\).png)

### **Example**

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

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/1%20\(207\).png)

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.

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/2%20\(205\).png)

Conversely, if we replace the *lookFor* value with “3”, you can see that Astera Data Stack has returned the Boolean value, False.

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/3%20\(37\).png)
