cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Join error in CDS for Teams

Hi everyone,

 

I'm currently using PowerApps for Teams to create an app based on Dataflex (not Dataflex Pro). I'm having problems joining two tables and I now created another dedicated PowerApps for Teams app to further evaluate the problem using a very simplyfied data model. I have two tables

 

tbl_customer
|customerNr|customerName|
|         1| MyName     |

 

 

tbl_orders
|orderID|orderDescription|customerNumber|
|      1|   MyDescription|             1|
|      2| 2nd Description|             1|

 

 

My Lookup is configured as followed:

lookup1.png

 

I added a DataTable control with the following Item Property

 

AddColumns(
    tbl_Orders,
    "customerName",
    LookUp(tbl_customers,customerNr=tbl_Orders[@customerNumber],customerName)

 

 

I keep getting the following error message

lookup2.png

 

Is there some limitation in the normal dataflex version? I found enough documentation indicating that my formular should work but I can't find a way to get it working.

 

Thanks for your help!

 

1 REPLY 1
Super User
Super User

OK, so you don't need to to a lookup or add columns if you have a lookup field for customer on Order. You don't need to join. just use dot notation.

 

for example, click the column where you have the customer in your data table and change the formula to 

ThisItem.Customer.whateverfieldfromcustomeryouwishtodisplay

 For example, say you want to show the Name field from customer, you would do 

ThisItem.Customer.Name

 

Also, from the looks of your tables it appears you are trying to do this like SQL defining a numerical ID for your records--you really don't need to do that with Dataverse--when you create a lookup field, it stores the GUID of the other record, so no need to manually join or store number fields--it does that automatically.

 

All you need in orders is your order name/number and a lookup to customer

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Users online (3,602)