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 / Auto Save New SharePoi...
Power Apps
Unanswered

Auto Save New SharePoint List record in Power Apps form

(0) ShareShare
ReportReport
Posted on by

Hi All

 

I have created a Power Apps form to work with my SharePoint List and everything looks great, however, I have noticed that the hidden ID property for the new List record does not get populated/generated until the new List record is saved.

 

My problem is I need this ID value as I use it to calculate a JobNumber property for my list (I use the ID value and add it to a seed value to generate a unique Job Number in my List). I then use this JobNumber property to upload a number of documents to a SharePoint Document Library (I create a subfolder for each Job and upload a number of controlled documents).

 

Does anyone know how I can 'Save' the new List record and stay in the Power Apps form ?

 

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

    @Anonymous

     

    So you used Powerapps to customize the SharePoint Formy right? You are not talking about a standalone app.

     

    As I'm only on my mobile I can only give some advice...

     

    1. Select SharePoint Integration on the controls menu and have a look at the OnSave or OnSuccess Property... There should be a Formular RequestHide()

     

    This Formular actually closes the Form. If you remove this you will stay on the Form even if you click save. 

     

    2. After you submitted your form by clicking Save you can get the ID of the item you just saved by looking at the Form.LastSubmit formular

     

    I think it should be something like Form1.LastSubmit.Id

     

    You can take this value, do some calculation and either Patch or resubmit the Form with the updated values and then finally call

    RequestHidd() 

     

    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.

     

     

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Go to the OnSuccess property of the form and you should see the formula that is resetting the form and closing it (RequestHide). You could manipulate the formula, so it only resets and hides the form if it is un Edit mode vs New. This way if the form is new it will save and create the item in SharePoint but keep the form open for more editing (if that is what you want to do).

  • Community Power Platform Member Profile Picture
    on at

    Thanks for taking the time to reply PowerRanger.

     

    Yes, this is a customized SharePoint List Form, not a stand-alone app.

    Although this will help me in future situations it doesn't fix my issue as I need the Id straight away in the form as soon as it loads. I almost need to do a SubmitForm type command as part of the form load process.

     

    I will try and see if I can Patch back to the SharePoint List but struggling to understand the start-up sequence. I need something like a WinForms Form_Loaded or Blazor OnInitializedAsync event to automatically save the List record back to SharePoint without having to press a button.

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the reply Jeff.

     

    As I have just written, I almost need a Form_Loaded or Blazor OnInitializedAsync event to save the record back to the SharePoint List as I need the Id property straight away.

     

    I will keep playing but to be honest I'm struggling as every corner is another learning curve. May have to consider Blazor as my front-end tool.

     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard