# Advanced Queries for Lines

**URL:** <https://forum.manager.io/t/advanced-queries-for-lines/52861>\
**Category:** Uncategorized\
**Created:** [April 15, 2024, 2:44pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861 "2024-04-15T14:44:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ealfardan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/ealfardan/32/63166_2.png) [@Ealfardan](https://forum.manager.io/u/Ealfardan)\
**Post date:** [April 15, 2024, 2:44pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/1 "2024-04-15T14:44:59Z")

</div>

Continuing the discussion from [Sales Invoices - Lines screen and Advanced Queries, New from duplicate](https://forum.manager.io/t/sales-invoices-lines-screen-and-advanced-queries-new-from-duplicate/52658/4):

`Advanced Queries` is proving to be a powerful reporting tool in Manager, however, compared to `Custom Reports`, it lacks in one major area, namely, joining/merging tab data to line data.

For example, using `Custom Reports` we are able to query **Purchase Invoices** and filter by both document level `Custom Field` as well as with line level `Division`.

In `Advanced Queries`, however, you can only use document level `Custom Field` on tab data or use line level `Division` on line data, **but not both**.

The only solution is to run two advanced queries, copy to clipboard and then stitch them together in a spreadsheet.

@lubos Is there a plan to enable the joining of tab and lines data?

---

<div class="post-metadata">

**Author:** ![Mabaega](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mabaega/32/47471_2.png) [@Mabaega](https://forum.manager.io/u/Mabaega)\
**Post date:** [April 15, 2024, 3:02pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/2 "2024-04-15T15:02:27Z")

</div>

What about `Advanced Queries` in `Summary`-`Transactions`?  
I haven’t tried it, but I see that we should be able to get data in D`ocument level` and` Lines level` at the same time.

---

<div class="post-metadata">

**Author:** ![Ealfardan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/ealfardan/32/63166_2.png) [@Ealfardan](https://forum.manager.io/u/Ealfardan)\
**Post date:** [April 15, 2024, 3:05pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/3 "2024-04-15T15:05:48Z")

</div>

I tried `Transactions` view, you don’t get any `Custom Fields` there.

---

<div class="post-metadata">

**Author:** ![shahabb](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@shahabb](https://forum.manager.io/u/shahabb)\
**Post date:** [April 15, 2024, 5:21pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/4 "2024-04-15T17:21:14Z")

</div>

> [@Ealfardan](#):
>
> Is there a plan to enable the joining of tab and lines data?

I think this is the whole purpose of the Transactions tab on Summary page.  
Currently it is limited but we hope custom fields supports is added soon along with custom field support on inventory tab transaction list which could be used for serialized/batch/lot invenotory and to see the balance qty.

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [April 17, 2024, 4:34pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/5 "2024-04-17T16:34:30Z")

</div>

I’m working on ability for advanced queries to be able to see data from multiple sources.

So for example, if you have `Sales Invoices - Lines` screen, you should be able to create advanced query to group by custom field defined on customer level. Currently that’s not possible.

---

<div class="post-metadata">

**Author:** ![shahabb](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@shahabb](https://forum.manager.io/u/shahabb)\
**Post date:** [April 17, 2024, 5:04pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/6 "2024-04-17T17:04:01Z")

</div>

> [@lubos](#):
>
> custom field defined on customer level

Would be great if same thing is done for Footers merge tags too.

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [April 17, 2024, 5:05pm UTC](https://forum.manager.io/t/advanced-queries-for-lines/52861/7 "2024-04-17T17:05:36Z")

</div>

Yeah I agree. Merge tags will support this too.
