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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DisplayMode for New Sh...
Power Apps
Unanswered

DisplayMode for New SharePoint Customized Form is Always Edit Never New

(0) ShareShare
ReportReport
Posted on by 139

According to Microsoft:

 

 

OnNew - Sets SharePointForm1 in new mode.

OnNew - Actions to perform when a user selects the New button or opens the Create item form in SharePoint.

 

 

However, the default DisplayMode for SharePoint Forms is NOT "New" when the NEW button in SharePoint is clicked, rather it is "EDIT".

 

Steps to duplicate:

 

  1. Open SharePoint Site Contents
  2. Create blank list with nothing in it.
  3. Hit New
  4. Customize the form with PowerApps
  5. Expand "Title_DataCard1"
  6. Insert > "Text input"
  7. Set Default to "SharePointForm1.DisplayMode".
  8. Note that the text box will read "edit", NOT "new".stayinginsync_0-1652467758726.png
  9. File > Save
  10. "Publish to SharePoint"
  11. Go "Back to SharePoint"
  12. Open List Settings, make sure "Use a custom form created in PowerApps" is selected, then hit OK.
    stayinginsync_1-1652468132561.png
  13. Refresh webpage/tab with SharePoint list until PowerApp form appears when NEW is clicked.
  14. Note that the text box containing the DisplayMode of the form is EDIT, not NEW
    stayinginsync_2-1652468354009.png

     

  15. Reopen the form in PowerApps
  16. Open SharePointForm1.DefaultMode.  Notice it reads "Edit".
  17. Change it to "New".
    stayinginsync_5-1652469171473.png
  18. Save, then Publish
  19. Refresh page/list again 2 or 3 times, or access list as a different user in a different browser profile
  20. DisplayMode for the form is still "edit", not "new
    stayinginsync_3-1652468705275.png

     

I have been running around in circles, trying to make fields READ-ONLY/VIEW in Edit Mode, but editable in New mode.  Now I know why it never worked.  I cannot find any documentation regarding this, nor has anyone's training videos talked about this.  Can anyone else confirm this?  Is there something I'm missing?

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @stayinginsync ,

    There is nothing wrong - there are only two DisplayModes - Edit and View - the first puts the form in a mode that can be edited (which includes NewForm and EditForm), the difference being an Edit form displays the selected record values, a New form displays the field defaults.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

  • stayinginsync Profile Picture
    139 on at

    @WarrenBelz 

     

    Perhaps explaining the situation may put it in a better perspective.  It is a follow-up to our previous discussion on a different thread.

     

    PowerApp Form:

     

    stayinginsync_0-1652799702977.png

     

    • ddDropDown1.Items

     

    Choices([@'SPList'].'Status')​

     

     

    • cboComboBox1.Items

     

    If(SharePointForm1.DisplayMode.Edit, {Title: ThisItem.field_1})

     

    • cboComboBox1.DefaultSelectedItems

     

    If(SharePointForm1.DisplayMode.Edit, {Title: ThisItem.field_2})

     

     

    • cboComboBox2.Items

     

    SortByColumns(Filter(SPList2, SPField2 = cboComboBox1.Selected.Title),"Title",SortOrder.Ascending)

     

    • cboComboBox2.DefaultSelectedItems

     

    If(SharePointForm1.DisplayMode.Edit, {Title: ThisItem.SPField2})

     

    • txtTextBox3.Default

     

    If(
    //both false
     And(
     ! chkCheckBox1.Value,
     ! chkCheckBox2.Value
     ),
     Concatenate(
     Trim(cboComboBox1.Selected.field_1),
     " " ,
     Trim(txtTextBox2.Text)
     ),
    //1 true, 2 false
     And(
     chkCheckBox1.Value,
     ! chkCheckBox2.Value 
     ),
     Concatenate(
     Trim(cboComboBox1.Selected.field_1), " " ,
     Trim(cboComboBox2.Selected.field_4), " " ,
     Trim(txtTextBox2.Text)
     ),
    //1 false, 2 true
     And(
     ! chkCheckBox1.Value,
     chkCheckBox2.Value 
     ),
     Concatenate(
     Trim(cboComboBox1.Selected.field_1), " " ,
     Upper(txtTextBox1.Text) , " " ,
     Trim(txtTextBox2.Text)
     ),
    //else, so both true
     Concatenate(
     Trim(cboComboBox1.Selected.field_1), " " ,
     Trim(cboComboBox2.Selected.field_4), " " ,
     Upper(txtTextBox1.Text) , " " ,
     Trim(txtTextBox2.Text)
     )
    )

     

     

    ISSUE #1 - 

     

    When I hit NEW in SharePoint, all the fields empty out.  When I select an item in the SharePoint List and hit "EDIT", cboComboBox1 and cboComboBox2 are populated correctly.  However, their Selected values are no longer being populated in txtTextBox3.Default.

     

    ISSUE #2 - 

     

    I don't know if it is because of ISSUE #1, or something else, but after hitting EDIT, then Save, instead of updating the existing Item, it creates a new item in the list.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @stayinginsync ,

    The first thing I can see (not sure if it is relevant is you do not need this

    If(SharePointForm1.DisplayMode.Edit, . . .

    Other than that, there is nothing that I can see to explain the behaviour you have stated.

    I would probably need a working model to debug the Default of that Text box however . . .

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard