If you wanna add columns from other tables to a collection within power apps, this can be achieved by usding the “AddColumns” function. Dependend of the datasource, this can get pretty slow – anyhow for “smaller” references this is an acceptable way of doing this.
Filter(
ShowColumns(
AddColumns(
'[dbo].[Finance.Wf.InvoiceHeader]',
"osUser",
LookUp('[dbo].[Finance.Wf.InvoiceResponsible]', InvoiceHeaderId = '[dbo].[Finance.Wf.InvoiceHeader]'[@InvoiceHeaderId] && InvoiceDetailId = Blank(), osUser),
"Name",
LookUp('[dbo].[V_DIM_BUSINESSPARTNER]', BusinessPartnerId = '[dbo].[Finance.Wf.InvoiceHeader]'[@BusinessPartnerId], Name)
),
"InvoiceHeaderId", "InvoiceNumber","InvoiceDate","Currency" , "osUser", "Status","NetAmount","TaxAmount","GrossAmount","DocURI","BusinessPartnerId","Name")
,Status = "qualify" && osUser = Lower(User().Email))
Code-Sprache: JavaScript (javascript)
To add columns (Lookup) from mutliple references, you need to add them into the “AddColumns” as shown in the code sample.