Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Join a document in a dynamic list query and use its table section as a value table

Forum

Search UsersRules
Join a document in a dynamic list query and use its table section as a value table
#1
Just came
Points:: 0
Joined:: Jul 31, 2014

Hello everybody,

I have two types of documents: Invoice and Payment

Payment contains a table section LineItems with an attribute of the type Invoice.

Payment
 -LineItems
   -Invoice
   -...

Is it possible to join Payment to Invoice in a query of a dynamic list,
so that I can see all payment items regarding to the active row of invoices in a form table.
(directly in the list form)

e.g. the DataPath of the table would be: Items.ListOfInvoices.CurrentData.PaymentItems
where PaymentItems must be type of a ValueTable

I already know that i can create an event ListOnActivateRow of the Invoice form table,
do a query on the CurrentRow and fill a value table, but I want to know if there is an easier or more
efficient way to tackle this.

Profile
#2
Interested
Points:: 0
Joined:: Dec 4, 2017

Dear Oliver,

The way you depicted is one of the two popular methods to achieve the goal you want. In this way, you fill a value table via a query to which you pass an invoice as a parameter. As a result, the query returns all the items for the value table at once.

Another way to achieve the same goal is to populate a dynamic list to which you pass an invoice as a filter parameter. The benefit of using dynamic lists is that every time you apply the filter, you can get the desired number of items rather than all the items at once.

Best regards,
Vladimir Gurov

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.