cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shreenathgandhi
Level: Powered On

Get data from Dynamics 365 Lookup Table

I have to 2 tables Table A and Table B from Dynamics 365 data source to be used for PowerApps application.

I have a text input control where user needs to input value, based on which couple of other labels need to be populated.

The data to be input in text input is present in Column AA of Table A.

I used the lookup function to retrieve column AB from Table A to be displayed on label using:

LookUp('Table A', 'Column AA' = TextInput1, 'Column AB')

This works fine.

However for second label I need to display data from Column AC of Table A which is a lookup to Table B.

When I write :

LookUp('Table A', 'Column AA' = TextInput1, 'Column AC')

I get the GUID, which is obviously not what I want. So instead I wrote : 

LookUp('Table A', 'Column AA' = TextInput1, 'Column AC(mytr_TableB)'.'Column AC(mytr_ColumnBB)')

This one returns blank values. I also tried: 

LookUp('Table A', 'Column AA' = TextInput1, 'Column AC(mytr_TableB)').'Column AC(mytr_ColumnBB)'

That also gives blank values.

I though adding . followed by required column name would give the data directly for complex control type columns(Lookup Columns), but its not working.

Can anyone please help?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Get data from Dynamics 365 Lookup Table

Hi!

I guess you try to retrieve a value that is in Table B, right? You need to do a lookup against Table B which is the reference via GUID from column AC in Table A if I understand you correctly if that is the case. Try this formula instead:

 

LookUp(Table B,Column AA = LookUp(Table A,Column AA = TextInput1.Text,Column AC),Column AB)

 

In this formula, I assume that Column AA in Table B holds the GUID and Column AB holds the value you want to display. Hope it helps 🙂

 

BR

Pontus

View solution in original post

shreenathgandhi
Level: Powered On

Re: Get data from Dynamics 365 Lookup Table

Thanks a lot. This helped me solve the issue.

However the code you gave was giving delegation warning. Solved it using variables.

In the OnChange of TextInput1:

UpdateContext({variable: LookUp(Table A,Column AA = TextInput1.Text,Column AC})

And then in Text of the Label: 

LookUp(Table B,Column AA = variable, Column AB)

View solution in original post

2 REPLIES 2

Re: Get data from Dynamics 365 Lookup Table

Hi!

I guess you try to retrieve a value that is in Table B, right? You need to do a lookup against Table B which is the reference via GUID from column AC in Table A if I understand you correctly if that is the case. Try this formula instead:

 

LookUp(Table B,Column AA = LookUp(Table A,Column AA = TextInput1.Text,Column AC),Column AB)

 

In this formula, I assume that Column AA in Table B holds the GUID and Column AB holds the value you want to display. Hope it helps 🙂

 

BR

Pontus

View solution in original post

shreenathgandhi
Level: Powered On

Re: Get data from Dynamics 365 Lookup Table

Thanks a lot. This helped me solve the issue.

However the code you gave was giving delegation warning. Solved it using variables.

In the OnChange of TextInput1:

UpdateContext({variable: LookUp(Table A,Column AA = TextInput1.Text,Column AC})

And then in Text of the Label: 

LookUp(Table B,Column AA = variable, Column AB)

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,113)