web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Lookup in Set

(1) ShareShare
ReportReport
Posted on by 433

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.

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

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

  • Verified answer
    akharns Profile Picture
    433 on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard