cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GReddy
Helper I
Helper I

AddColumns within Look field

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

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

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
   

@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

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.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

GReddy
Helper I
Helper I

Thanks Jeffer Ni , It works now. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,030)