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 within Look...
Power Apps
Answered

AddColumns within Look field

(0) ShareShare
ReportReport
Posted on by 56

Hi All,

 

I am having difficulties to use AddColumn sfunction with look field. I tried below formula but ends with type can't compared error message. 

GReddy_0-1649598161801.png

Any advice is appreciated.

 

Regards,

GR

 

Categories:
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @GReddy ,

    Firstly, can you please post code in Text also - saves OCR or typing at this end. You did not say which end is a Lookup column, but I will assume the List - so try the below (also you do not need the As statement)

    ClearCollect(
     colListWO,
     AddColumns(
     colWorkOrder,
     "AssetName",
     Filter(
     'Customer Assets', 
     'Customer Asset'.Value = Asset
     ).'Asset Name'
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • GuravaReddy Profile Picture
    56 on at

    Hi WarrenBelz,

     

    I tied below code. System is not allowing to use "Value".

     

    ClearCollect(colListWO,
          AddColumns(colWorkOrder, "AssetName",
         Filter('Customer Assets',
         'Customer Asset'.Value = Asset
          ).'Asset Name'
         )
    )

     

    Below are Tables structure in Dataverse  and I am trying to create a collection which includes work order details and asset name.

     

    Its Many to One relation between Work order and Asset table.

     

     

    Work order table  
       
    Display nameNameData type
    WO Numbermsdyn_workorderidUnique Identifier
    Assetmsdyn_customerassetLookup
    Start DateDate 
    Work Order Numbermsdyn_nameText
       
    Customer Assets  
    Display nameNameData type
    Customer Assetmsdyn_customerassetid
    Unique Identifier
    Asset Namemsdyn_nameText
    AssetType  Choices
       
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    @GReddy ,

    It is good to mention your data source in your initial post - Lookup is normally associated with SharePoint (which Is why I responded as I am a SharePoint user) - DataVerse has Option Sets. This document may be useful to you.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @GReddy ,

     

    Since Asset is a LookUp column in Dataverse, it includes a record from the table it looked to, that is the Customer Assets. So please try below formula:

    ClearCollect(colListWO,
     AddColumns(colWorkOrder As WO, "AssetName",
     WO.Asset.'Asset Name'
     )
    )

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • GuravaReddy Profile Picture
    56 on at

    Thanks Jeffer Ni , It works now. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard