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!