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

Dropdown Box Value for Lookup formula...

Hi,

 

I have a simple App with; 1x Data Source (pricelist), 2x Dropdown Boxes (for Product ID & Currency) and a number of labels.

 

The Data Source is an excel file which represents a Price List:

 

 pricelist.png

 

Effectively what I want to achieve is to select the Product ID from a dropdown box and return the lookup value of "Desc" in one of the Labels and then select the required Currency and have the associated currency lookup value in another Label ajacent to the Description.

 

So...the formulas are as follows:

 

Dropdown1 (Product ID) - Items = ["111","222","333","444"]

Dropdown2 (Currency) - Items = ["EUR","GBP","USD"]

 

Label5(Description) - Text = LookUp(pricelist,ID=Value(Dropdown1.Selected.Value),Desc)

 

          This works as expected If Dropdown1="111" then this successfully returns "Product 1"

 

Label6(Price) - Text = LookUp(pricelist,ID=Value(Dropdown1.Selected.Value),EUR)

 

          This works as expected If Dropdown1="111" then this successfully returns the EUR ammount "25"

 

HOWEVER...I would like to use Dropdown2 to choose the Currency; I have tried the following:

 

Label6(Price) - Text = LookUp(pricelist,ID=Value(Dropdown1.Selected.Value),Dropdown2.Selected.Value)

 

          This does not work as expected If Dropdown1="111" AND Dropdown2="EUR" then this returns "EUR" in Label6

 

Label6(Price) - Text = LookUp(pricelist,ID=Value(Dropdown1.Selected.Value),Value(Dropdown2.Selected.Value))

 

          This also does not work as expected If Dropdown1="111" AND Dropdown2="EUR" then this returns no value in Label6

 

I have included a copy of the App at the following location:

 

          https://www.dropbox.com/sh/wc8cam53evnrpke/AABpVV1AWQx1fBiNtdKkwv2Va?dl=0

 

I am sure I am just missing something simple...but cannot figure it out!!!

 

Thanks,

 

David

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dropdown Box Value for Lookup formula...

Hi @DH,

 

See lookup function syntax here:

LookUpTableFormula [, ReductionFormula ] )

 

ReductionFormula is evaluated over the record that was found, and then reduces the record to a single value. You need to reference columns within the table. But you are using the data from a dropbox not the "Table". This is why the formula won't work.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
DH
Level: Powered On

Re: Dropdown Box Value for Lookup formula...

Hi,

 

I am stil looking for help with this.

 

Any ideas?

 

Thanks,

 

David

Community Support Team
Community Support Team

Re: Dropdown Box Value for Lookup formula...

Hi @DH,

 

See lookup function syntax here:

LookUpTableFormula [, ReductionFormula ] )

 

ReductionFormula is evaluated over the record that was found, and then reduces the record to a single value. You need to reference columns within the table. But you are using the data from a dropbox not the "Table". This is why the formula won't work.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,658)