cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

How to collect data (field values) from a CDS lookup Field

Hi Everyone,

I thought this would be simple, but apparently not. Here is scaled down version of the CDS entity structure:

saletyp.JPG

I was just looking to collect the table data into a collection:

Clearcollect(SalesDetailCollect, 'Sales Detail')

However the resulting collection has no data for 'Sales Category"

Any ideas of what I am doing wrong?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to collect data (field values) from a CDS lookup Field

Hi @JasonF 

You can add the data in the lookup field by using the AddColumns() function.  

 

ClearCollect(SalesDetailCollect, AddColumns('Sales Detail',"SalesCategory",Lookup('Sales Types',SalesCategory=SalesType))

 

 The reference for table shaping functions is https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping 

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How to collect data (field values) from a CDS lookup Field

Hi @JasonF 

You can add the data in the lookup field by using the AddColumns() function.  

 

ClearCollect(SalesDetailCollect, AddColumns('Sales Detail',"SalesCategory",Lookup('Sales Types',SalesCategory=SalesType))

 

 The reference for table shaping functions is https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping 

View solution in original post

Highlighted
Helper III
Helper III

Re: How to collect data (field values) from a CDS lookup Field

Thank You,

That works.

 

JasonF

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (6,781)