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

Referencing Field (Column) Values

Years of progrmming experience - Days with PowerApps...

I would like to access the column values inside Data Table using the Drop Down (selected) as an index. Here's what I came up:

LookUp('[dbo].[Well]', 'WellID' = Dropdown_WellID.Selected.Value).Longitude

The comparison fails because the left side ('WellID') is a number, while the right side Dropdown_WellID.Selected.Value is text. So I tried:

LookUp('[dbo].[Well]', 'WellID' = Value(Dropdown_WellID.Selected.Value)).Longitude

Compiles without error. I set this as the default value of another text input. Start the app and no display.

I put the same code in the following code under the OnChange event for the drop down... still no display.

UPDATE: Change the lookup column from ID to Name because the selected value is the Name: LookUp('[dbo].[Well]', 'WellID' = Value(Dropdown_WellID.Selected.Value)).Longitude

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
samuelJ
Level 8

Re: Referencing Field (Column) Values

Hi, 

 

I am able to do this.  Under the advance tab, my drop down looks like the below:

cap1.PNG

If yours is the same, you should not have to worry about using value() function.

I have created an text input object and set the the Default property to the below:

LookUp('[dbo].[attendees]', Dropdown1.Selected.peopleId = 'peopleId').legalFirstName

There should not be a need to have something in the onChange property.  Can you confirm you are comparing on the same column?  Below you seem to state it should be comparing on the name column but is using the "WellId" column.


UPDATE: Change the lookup column from ID to Name because the selected value is the Name: LookUp('[dbo].[Well]', 'WellID' = Value(Dropdown_WellID.Selected.Value)).Longitude

Thanks in advance


 

 

 

2 REPLIES 2
Highlighted
samuelJ
Level 8

Re: Referencing Field (Column) Values

Hi, 

 

I am able to do this.  Under the advance tab, my drop down looks like the below:

cap1.PNG

If yours is the same, you should not have to worry about using value() function.

I have created an text input object and set the the Default property to the below:

LookUp('[dbo].[attendees]', Dropdown1.Selected.peopleId = 'peopleId').legalFirstName

There should not be a need to have something in the onChange property.  Can you confirm you are comparing on the same column?  Below you seem to state it should be comparing on the name column but is using the "WellId" column.


UPDATE: Change the lookup column from ID to Name because the selected value is the Name: LookUp('[dbo].[Well]', 'WellID' = Value(Dropdown_WellID.Selected.Value)).Longitude

Thanks in advance


 

 

 

Bobby_Wallace
Level: Powered On

Re: Referencing Field (Column) Values

Thank you!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 47 members 4,215 guests
Please welcome our newest community members: