# The Evaluate block Evaluate block The **Evaluate** block is a powerful tool for manipulating and evaluating data. It's ideal for filtering data, conditionally running parts of your flow, and integrating complex logic. Using [TypeScript](/docs/postman-flows/typescript/typescript-overview/) scripts or [Flows Query Language](/docs/postman-flows/flows-query-language/introduction-to-fql/) (FQL) queries, you can set up the **Evaluate** block to process data and send the result. The **Evaluate** block has pre-defined snippets to help you create FQL queries. ## Input **variable** - Accepts data from another block's output port. ## Output **Result** - Sends the result of the script or query. ## Setup The **Evaluate** block processes data it receives from its input ports and inserted [data blocks](/docs/postman-flows/reference/overview-data-blocks/). When created, the **Evaluate** block has one input port. When you connect another block to this port, the **Evaluate** block [inserts](/docs/postman-flows/reference/blocks/overview/#insert-data-blocks-into-other-blocks) a **Select** block and assigns the selected value to a variable named **value1**. To rename the variable, click it and enter a new name. You can also change the inserted **Select** block to a different data block by clicking the Flows select icon **Select** block's icon and choosing a data block from the dropdown list. You can also insert more variable data blocks into the **Evaluate** block to process their data. For example, you could insert a **String** block into your **Evaluate** block, name the variable `string1`, and reference it in your query as `string1`. Click Add data blocks **Add data blocks** to insert a data block into your **Evaluate** block. The **Evaluate** block has a text box where you can enter TypeScript to create scripts or FQL to create queries. Click the dropdown list at the top of the block to set the text box to use TypeScript or FQL. Then click inside the text box and enter your code. When the text box is set to use FQL, you can click **Snippets** and choose from a list of common tasks. Flows can't modify environment variables, including by using scripts in **Evaluate** blocks. ## Example To see the **Evaluate** block in an example flow, check out [Flow Snippets: Evaluate](https://www.postman.com/postman/flows-snippets/flow/63bc960882ae416b9e6bc11f). ## Related blocks You can use the [**Condition**](/docs/postman-flows/reference/blocks/condition/) and [**If**](/docs/postman-flows/reference/blocks/if/) blocks instead, depending on your use case. You can insert the following blocks into the **Evaluate** block to process their data including the [**String**](/docs/postman-flows/reference/blocks/string/), [**Bool**](/docs/postman-flows/reference/blocks/bool/), [**Number**](/docs/postman-flows/reference/blocks/number/), [**Null**](/docs/postman-flows/reference/blocks/null/), [**Select**](/docs/postman-flows/reference/blocks/select/), [**Now**](/docs/postman-flows/reference/blocks/now/), [**Date**](/docs/postman-flows/reference/blocks/date/), [**Date & Time**](/docs/postman-flows/reference/blocks/date-and-time/), [**List**](/docs/postman-flows/reference/blocks/list/), [**Record**](/docs/postman-flows/reference/blocks/record/), and [**Get Variable**](/docs/postman-flows/reference/blocks/get-variable/) blocks. ## Related pages For tutorials that use the **Evaluate** block, see the following: * [Calculate the years since a milestone](/docs/postman-flows/tutorials/beginner/calculate-years-since-milestone/) * [Create a count-based loop with the Repeat block](/docs/postman-flows/tutorials/beginner/create-count-based-loop/) * [Create a dashboard using Postman Flows](/docs/postman-flows/tutorials/advanced/create-a-dashboard-in-flows/) * [Create a list-based loop with the For block](/docs/postman-flows/tutorials/beginner/create-list-based-loop/) * [Send information from one system to another using Postman Flows](/docs/postman-flows/tutorials/advanced/send-information-from-one-system-to-another/)