cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JasonF
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
Drrickryp
Super User II
Super User II

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
Drrickryp
Super User II
Super User II

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

Thank You,

That works.

 

JasonF

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (67,113)