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 Platform Community / Forums / Power Apps / Canvas not recognizing...
Power Apps
Answered

Canvas not recognizing variables that I JUST set one line above

(0) ShareShare
ReportReport
Posted on by 189

See the red-lined bits.

All of them are saying Name undefined, but I just Set the offending variable in the code right above it! All the variables are RIGHT THERE.

What is going on?

Does canvas have a maximum number of variables? I've done a search for this question but have not found an answer.

 

Clipboarder.2020.10.15.png

Categories:
  • Verified answer
    Lexicon_ Profile Picture
    189 on at

    Solved!!

     

    My dumbass left a stray comma in there. I copied everything out and then pasted it back in in small chunks and finally caught the comma doing so.

     

    There's a ClearCollect further down the code - not in the screenshot - and I left a trailing comma behind the last item. Removing it fixed this. I didn't think this would be the cause and effect but here we are!

  • Javier Gallego Profile Picture
    Microsoft Employee on at

    Hi Lexicron, 

     

    thanks for sharing the solution.

     

    Regards,

    Javier

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard