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 / Modern Form "NaN" error
Power Apps
Suggested Answer

Modern Form "NaN" error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
I have run into a very weird error. I have a modern form where I'm trying to change the order of the cards.
 
When I attempt to do this. the card order doesn't change, but the X property of every card is changed to "NaN"
 
The screen I'm working on has five modern forms.  Two of them work fine.  The remaining three behave like this.
 
Any suggestions?
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,906 Moderator on at
    Seems like a bug.
    How were you changing the order?
    Can you manually change the X property?
  • Suggested answer
    AmínAA Profile Picture
    1,228 Moderator on at
    Greetings @NaivePowerApper!
     
    That really sounds weird. ¿How are you trying to move the order, and what data source are you using?
     
    In any case, the only way you should be moving the order of the cards is by using the fields property edit button. You can certainly use the X and Y property to move things around, but unless you want to dynamically move things, you shouldn't be touching that!
     
    It should work fine. I've tried several times with different data sources, but I've found no luck in replicating your error...
     
    Edit: I went to check the Microsoft learn page for the modern control to check if there was anything listed as a bug, or limitation, but turns out the modern form control is not even listed as a modern control... Modern controls and properties in canvas apps (preview). So, either the modern form control is not exactly a modern control, and it's just a re-skin of the classic form control, or it's just so new that it's probably not a good idea to use.
     
    Edit2: Overall, after checking with the new and old control, I have found that besides the design, there seems to be no difference besides design... So, if the "modern" form control gives you this error, you'd do good in using the classic one.

    If you like my response, please give it a Thumbs Up. Should this reply solve your question, please mark your post as Solved. Otherwise, feel free to reply to my answer for further help.
    Connect with me if you feel like it! 
  • NaivePowerApper Profile Picture
    Microsoft Employee on at
     
    Answers to the follow-up questions:
     
    How were you changing the order?
    I'm using the standard drag and drop functionality in the Form control "edit fields" section (like I've always done).  I'm not messing around with the Y property of the cards or any other trick method
     
    what data source are you using?
    Dataverse table
     
    Can you manually change the X property?
    Yes. I try to reorder the cards. X property of all the cards changes to "NaN" which causes an error. I select all the cards and bulk update the X property back to 0 to resolve the error.
     
    UPDATE - After much experimentation:
    (1) try to move cards
    (2) moves are not reflected in the form control "edit fields" section
    (3) X property of all the cards in the form changes to "NaN"
    (4) Save
    (5) Reload editor
    (6) Cards now appear in the desired order
    (7) Select all cards, and bulk update X property back to 0 to resolve errors.
    In other words, I can actually move the cards around, it just behaves very oddly
     
  • Suggested answer
    AmínAA Profile Picture
    1,228 Moderator on at
    Hi there @NaivePowerApper!
     
    So, can we conclude that the error is visual? There's nothing to suggest that the "modern" form control has a bug that can be easily replicated... We'd have to go into specifics, such as which navigator you're using, the operating system and its version, what add-ons and/or plugins you might be using... Because as hard as I tried doing everything, I can’t replicate this behavior.
     
    In any case, as I suggested, using the "classic" form control, using a new "modern" form control, or as you said, reloading your editor, should do the trick, so, unless you want to know exactly why this is happening, I believe its case closed.
     
    Perhaps it would be a good idea to warn on the Microsoft Learn page regarding the Form Control that this behavior can occur, and that saving and reloading should do the trick.
     
    Edit: As a new Idea, you could copy the YAML code of the form control, and check within the code, if the values are Nan, as we might get some insight on that.

    If you like my response, please give it a Thumbs Up. Should this reply solve your question, please mark your post as Solved. Otherwise, feel free to reply to my answer for further help.
    Connect with me if you feel like it! 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard