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 / Broken NewForm mode
Power Apps
Answered

Broken NewForm mode

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am having a strange issue with my EditForm in NewForm mode to a SharePoint list.  This worked before and now all of a sudden, is broken.  I've done a lot of things to this form, so maybe I did break it, but cannot figure out what did this.  I have TONs of work in this app and not alot of time.  

 

The form is put into Edit mode from a button on one page - that works fine, I can edit the record in the SP without a problem.  

The form is put into New mode from a different  button on another page - it acts like the new record has been submitted, sends me the email, but the record is never added to my SP list.  

 

I do have an auto-generated ID field - is that causing a problem maybe?  Default for the ID field is If(EditForm1.Mode=FormMode.New,Last(DataSource).ID+1,ID)

 

ANything else?  Only other things that have changed:  moved from Excel back-end to SP List last week, fixed the Search and Filter fields, and in the middle of having a colleague I am getting desperate - leadership is already testing this form and is noting that it's not even submitting now, after weeks of work - not good!  

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    One of the problems may be delegation with the Last() function.  Try

     

    If(EditForm1.Mode=FormMode.New,First(Sort(DataSource,Descending)).ID+1,ID)

     

    Max() and Last() are not delegatable.   Sort() is delegatable so it will work regardless of the number of items in your list.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you - I wonder if I'm still doing something wrong though.  I tried this and it begins to throw a delegation error (I have lots of those on my Search fields, BTW),  It also pulls in an ID of '2' which is way less than the last row of data in my SP list.  I have about 100 records, so it should be in the 100s.  I get what you are doing here, but no idea why it won't work!  

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I finally just saw an error - it was flashing by but just displayed longer - stating that an entry is required or has invalid data.  

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    Sometimes I find it helpful to put a label on the screen and set it's Text property to the formula that I want to check. If you only have a few hundred items you shouldn't have delegation problems.  I don't think you need to put any formula in the ID field of an edit form that uses a SharePoint list as it increments automatically when you add a new record. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    If you have figured out what the problem was and how you fixed it, please post your solution so that others can benefit from it.  

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have not - I cannot figure out why I am seeing the error all of a sudden but worse, I cannot submit new records to my SP list at all!  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Are you using a Custom form or have you created a full app from your SharePoint list?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It's a canvas app that was built from an XLS, moved to SP list, and has been customized a lot over the past week or so, to make it exactly what we need.  So sort of both, I guess?  The thing is that this worked before and I now cannot find anything that caused it to break.  It will edit a row on the SP list but will not create a new record.  I've tried multiple ways of incrementing the ID but think I really just need to leave that alone and display it for existing records.  At this point, I don't care about doing anything fancy with that, I just need this app to submit to the SP list for new records.  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    First, check on your list settings in SharePoint and find out which items are required.  Either uncheck the ones that are or make sure that you have added that column to your edit form.  I am guessing that somewhere along the way you deleted or hid a required field.  I think the ID issue is a "red herring".  It is normally a hidden field in SharePoint and it autoincrements when you add a new record. Capture.PNG

    If you are having trouble finding where to make the change in SharePoint, check out this link 

    https://lydonsolutions.com/2017/04/21/configure-required-fields-sharepoint/ 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I just checked and there are no required fields.  But I also discovered that my app is also not updating existing records.  It throws that error, but it is often hard to see because I had an email notification going out.  I turned that off and now I can see it.  But still cannot figure out what is wrong.  Maybe I take out the ID field (now it's just displaying the contents, not trying to auto-increment or anything and I will actually need it) but to test? 

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard