cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Highlighted
Helper V
Helper V

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
Highlighted
Super User III
Super User III

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.

Highlighted
Helper V
Helper V

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,019)