# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v9/functions/logical/exists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
