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.
Any advice is appreciated.
Regards,
GR
Solved! Go to Solution.
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.
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 name | Name | Data type |
WO Number | msdyn_workorderid | Unique Identifier |
Asset | msdyn_customerasset | Lookup |
Start Date | Date | |
Work Order Number | msdyn_name | Text |
Customer Assets | ||
Display name | Name | Data type |
Customer Asset | msdyn_customerassetid | Unique Identifier |
Asset Name | msdyn_name | Text |
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.
Thanks Jeffer Ni , It works now.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |