cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
akharns
Level 8

Lookup in Set

I want to initialize a variable in OnStart from a value stored in an Excel Table.  It's not working for me.

 

I have a table called Constants.  One row is as follows:

Name = "Inbound Threshold"

Measure = "Business days" (for documentation only)

LookupValue = 2

 

I'm trying to add the following OnStart Code:

set (InboundThreshold, Lookup(Constants, Name="Inbound Threshold", LookupValue)

 

I'm expecting it to create a variable called InboundThreshold with a value of 2.  

 

What is wrong?  It's not loading anything.  It does recognize the table column names, so I know I've connected successfully to the table.

1 ACCEPTED SOLUTION

Accepted Solutions
akharns
Level 8

Re: Lookup in Set

I solved it.  Apparently I had the table locked.  I closed the Excel table and it worked fine.  

 

So often it's a stupid mistake.  🙂

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Lookup in Set

@akharns 

I have 3 ideas to share with you.

 

#1  There is a missing bracket at the end of your code

Set(InboundThreshold, Lookup(Constants, Name="Inbound Threshold", LookupValue))

 

#2  How many records does your Excel table hold?  The delegation limit is 500 records.  LookUp might not be seeing past the 500th record.  You can increase the limit to 2,000 records in advanced settings.

 

#3  Are there mutliple records with the Name "Inbound Threshold"?  LookUp will only return the 1st result.

akharns
Level 8

Re: Lookup in Set

I solved it.  Apparently I had the table locked.  I closed the Excel table and it worked fine.  

 

So often it's a stupid mistake.  🙂

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 (4,867)