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 / The Function "Add Colu...
Power Apps
Answered

The Function "Add Column" has some invalid arguments

(0) ShareShare
ReportReport
Posted on by 265
Hi guys,
For below code, I am getting this error. colSPOPDBalanceHistory and colSPEmployee are  created collections.
 
ClearCollect(
    colUsageHistorySummery,
    AddColumns(
        colSPOPDBalanceHistory,
        "EmployeeName",LookUp(colSPEmployee,EmployeeID = colSPOPDBalanceHistory[@EmployeeID],EmployeeName),
        "Grade",LookUp(colSPEmployee,EmployeeID = colSPOPDBalanceHistory[@EmployeeID],Grade),
        "OPDCategory",LookUp(colSPEmployee,EmployeeID = colSPOPDBalanceHistory[@EmployeeID],OPDCategory.Value)));
 
I didn't get what is the issue inside of this code.
 
Thanks
Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Erandi ,

     

    Could you please share a screenshot of the formula bar? Which part of the formula was throwing this error? Please try below formula instead first:

    ClearCollect(
     colUsageHistorySummery,
     AddColumns(
     colSPOPDBalanceHistory As BH,
     "EmployeeName",
     LookUp(colSPEmployee,EmployeeID = BH.EmployeeID, EmployeeName),
     "Grade",
     LookUp(colSPEmployee,EmployeeID = BH.EmployeeID,Grade),
     "OPDCategory",
     LookUp(colSPEmployee,EmployeeID = BH.EmployeeID, OPDCategory.Value)
     )
    );

     

    Best regards,

  • Erandi Profile Picture
    265 on at

    @v-jefferni Thank you very much,it is worked

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard