web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / AddColumns function di...
Power Apps
Answered

AddColumns function display error

(0) ShareShare
ReportReport
Posted on by 308

Hi PowerApps community,

 

I am trying to add a lookup column in my galley list. However, I have tried insert the code in my gallery and in a button but I keep getting the same error:

 

First attempt:

AddColumns(Filter(
 colOrders,
 IsBlank(cbVendors.Selected.ID) || IsEmpty(cbVendors.SelectedItems) || Supplier_ID = cbVendors.Selected.ID,
 IsBlank(txtOrderQuote) || Quote_Num = txtOrderQuote.Text
),"Client_ID",LookUp(colParentOrders,Merge_ID=Merge_ID,Client_ID))

 

Second attempt:

Filter(
 AddColumns(colOrders,"Client_ID",LookUp(colParentOrders,Merge_ID=Merge_ID,Client_ID)),
 IsBlank(cbVendors.Selected.ID) || IsEmpty(cbVendors.SelectedItems) || Supplier_ID = cbVendors.Selected.ID)

 

Merge_ID is in the colOrders and the colParentOrders.

 

Any help will be much appreciated.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JB0007 

    Please consider changing your Formula to the following:

    Filter(
     AddColumns(colOrders As _item,
     "Client_ID", LookUp(colParentOrders, Merge_ID = _item.Merge_ID, Client_ID)
     ),
     IsBlank(cbVendors.Selected.ID) || Supplier_ID = cbVendors.Selected.ID
    )

    The IsEmpty in your formula is not relevant.

    Your LookUp needs to have which Merge_ID you want to match.  In the above, the colOrder is given a reference name of _item and used in the lookup formula.

     

    I hope this is helpful for you.

  • JB0007 Profile Picture
    308 on at

    Awesome Randy,

     

    Thank very much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard