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 / What is wrong with the...
Power Apps
Answered

What is wrong with the code

(0) ShareShare
ReportReport
Posted on by 79

I was working on this Power App to create a sketchbook and gallery based on this youtube video https://www.youtube.com/watch?v=vTYpcCQorRY. I am following it step by step. The Set(n,0) was working yesterday without errors but today it says it is incorrect. Then the bgcolor isn't working but it worked for her. I don't understand what the error is. Maybe it is a bug? does anyone know what's going on. I am following every step to the letter yet it is failing me but works for her.

Screenshot 2024-03-20 100821.png
Categories:
  • wolenberg_ Profile Picture
    1,476 Super User 2026 Season 1 on at

    Hello @TheFlowState  ,

     

    Try to find the another Set(n) for this variable, probally in another screen / control, you are trying to put an different type of data inside this variable, for example: if you start the variable as a whole number, and try to put a string or date in other instance, you face this issue that you show here.

     

    -------------------------------------------------------------------

    If my reply helped you, please give a 👍
    If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it.

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    What is the error message that you are getting when you hover over the code in the editor? What error is showing in the App checker?

  • Verified answer
    JasonZF Profile Picture
    574 on at

    You have your code in the StartScreen property. Did you mean to put it in the OnStart property?

  • TheFlowState Profile Picture
    79 on at

    TheFlowState_0-1710944651215.pngTheFlowState_1-1710944660361.png

     

  • TheFlowState Profile Picture
    79 on at

    I'm not a coder. I didn't understand what you said. I'm following exactly what she is doing and it was working just fine yesterday.

  • TheFlowState Profile Picture
    79 on at

    TheFlowState_2-1710944776646.png

    This is the n value

  • wolenberg_ Profile Picture
    1,476 Super User 2026 Season 1 on at

    You need to move this entire code to OnStart property like @JasonWS  saids.

     

    Just to know "StartScreen" it is the name of the screen that you wanted to start your application,

    and "OnStart" it's an event that happens every time your application started.

     

     

  • TheFlowState Profile Picture
    79 on at

    Thanks for the help. 

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    You should also check that running OnStart is enabled in the settings. It is enabled by default anymore.  If not enabled the code won't run when you start the app.

    image.png

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard