cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Post Patron
Post Patron

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
Post Patron
Post Patron

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
mdevaney
Super User
Super User

@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
Post Patron
Post Patron

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.  🙂

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,585)