# findByTitle

The findByTitle function can be used when you want to find the values of the nodes with same name/title.

### Syntax

findByTitle(searchString) - > \[?]

### Arguments

<table><thead><tr><th width="225">Arguments</th><th width="201">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>searchString</td><td>Text / Number</td><td>Title to match the node name.</td></tr></tbody></table>

### Remarks

This function can only be used after refering a node for which this calculation needs to be done as shown below in the example.

### Example

Consider a Scenario where you want add all the nodes with title "Apple Sales" & "Orange Sales". Below is the data of apple and orange sales made by different Suppliers.

<table><thead><tr><th width="240">Period</th><th width="83">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Suppliers</mark> (Parent node)</td><td>185800</td><td>192400</td><td>194000</td><td>182400</td><td>188000</td><td>206900</td><td>184900</td><td>186100</td><td>192500</td><td>188600</td><td>202650</td><td>190050</td></tr><tr><td>   Supplier A</td><td>55700</td><td>57900</td><td>60900</td><td>55900</td><td>59200</td><td>62100</td><td>56200</td><td>58600</td><td>59300</td><td>58300</td><td>61400</td><td>60300</td></tr><tr><td>       <mark style="color:green;background-color:yellow;">Apple Sales</mark></td><td>24300</td><td>25300</td><td>25800</td><td>23300</td><td>27300</td><td>28400</td><td>21200</td><td>26900</td><td>25700</td><td>24200</td><td>28900</td><td>27300</td></tr><tr><td>       Orange Sales</td><td>31400</td><td>32600</td><td>35100</td><td>32600</td><td>31900</td><td>33700</td><td>35000</td><td>31700</td><td>33600</td><td>34100</td><td>32500</td><td>33000</td></tr><tr><td>   Supplier B</td><td>60400</td><td>61800</td><td>56600</td><td>56300</td><td>57300</td><td>60900</td><td>58700</td><td>58000</td><td>59000</td><td>62600</td><td>62800</td><td>60800</td></tr><tr><td>       <mark style="color:green;background-color:yellow;">Apple Sales</mark></td><td>22500</td><td>22100</td><td>21800</td><td>23600</td><td>21900</td><td>22300</td><td>24200</td><td>24800</td><td>21700</td><td>25600</td><td>23400</td><td>22000</td></tr><tr><td>       Orange Sales</td><td>37900</td><td>39700</td><td>34800</td><td>32700</td><td>35400</td><td>38600</td><td>34500</td><td>33200</td><td>37300</td><td>37000</td><td>39400</td><td>38800</td></tr><tr><td>   Supplier C</td><td>69700</td><td>72700</td><td>76500</td><td>70200</td><td>71500</td><td>83900</td><td>70000</td><td>69500</td><td>74200</td><td>67700</td><td>78450</td><td>68950</td></tr><tr><td>      <mark style="color:green;">Apple Sales</mark></td><td>43400</td><td>44300</td><td>46700</td><td>45300</td><td>43600</td><td>46900</td><td>44200</td><td>42800</td><td>45900</td><td>43800</td><td>47200</td><td>41000</td></tr><tr><td>       Orange Sales</td><td>26300</td><td>28400</td><td>29800</td><td>24900</td><td>27900</td><td>37000</td><td>25800</td><td>26700</td><td>28300</td><td>23900</td><td>31250</td><td>27950</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Total Apple Sales] node:

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:purple;">**`[Suppliers]`**</mark>**`.`**<mark style="color:blue;">**`DESCENDANTS`**</mark>**`.`**<mark style="color:blue;">**`findbytitle`**</mark>**`("`**<mark style="color:green;background-color:yellow;">**`Apple Sales`**</mark>**`")`**

Here we have mentioned the \[Suppliers] node name before writing Findbytitle which means we are asking the function to go to the descendants of the Suppliers node and get the value under the title "Apple Sales".

### Result

The function will add up all the Supplier's Apple Sales value and give it in the Total Apple Sales node.

<table><thead><tr><th width="240">Period</th><th width="83">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Suppliers</td><td>185800</td><td>192400</td><td>194000</td><td>182400</td><td>188000</td><td>206900</td><td>184900</td><td>186100</td><td>192500</td><td>188600</td><td>202650</td><td>190050</td></tr><tr><td>Total Apple Sales</td><td>90200</td><td>91700</td><td>94300</td><td>92200</td><td>92800</td><td>97600</td><td>89600</td><td>94500</td><td>93300</td><td>93600</td><td>99500</td><td>90300</td></tr></tbody></table>


---

# 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://docs.valq.com/model/formula-functions/range-functions/findbytitle.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.
