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

Community site session details

Session Id : 0N021yvudIcCde0d/aUfMW
Power Apps - Building Power Apps
Answered

Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

Like (0) ShareShare
ReportReport
Posted on 3 May 2023 23:06:41 by 101

Hello friends,

The purpose of my app is for my colleagues to enter in details and submit the results to a SharePoint list.
This is fine for a singular item, but then we all quickly realized they do this for multiple items, resulting in entering the same data over and over again.

POAppSS.jpg

So I am looking at a way to duplicate most of the data from the last entry, but as a separate record that will be edited by the user before then submitting the new entry to the list. 
I tried experimenting with Last.Submitted and Patch but then had to revert to the single record method so they could use a somewhat working app.

Jandal_Power_0-1683155089159.png

Any ideas would be great.

Regards,
Jandal_Power

I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    151,631 Most Valuable Professional on 03 May 2023 at 23:51:08
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Hi @Jandal_Power ,

    You could set a Variable OnSuccess of the Form

    UpdateContext({varRecord: Self.LastSubmit})

    and then have the Default of the control (I am assuming you only use the Form in New Mode) - example for Text Input with actual field name

    varRecord.FieldName

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Jandal_Power Profile Picture
    101 on 04 May 2023 at 01:39:19
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Thank you @WarrenBelz I think that might be working. 😀
    Does it only work for the Text Inputs and not possible for look ups and choice fields also?

    Also, never used variables before. Question, so we are creating a variable called "Record" and we want varRecord: to "UpdateContext" based off the Self.LastBubmitted entry?

  • WarrenBelz Profile Picture
    151,631 Most Valuable Professional on 04 May 2023 at 02:13:06
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Hi @Jandal_Power .

    Close - the Variable is called varRecord (you can call it whatever you want) and in this case contains the entire record you have just submitted in a one-line Table with all the fields and their values.

    In the case of Choice fields (I assume single choice and you are using a Combo Box) the Default would be

    {Value: varRecord.YourFieldName.Value}

    Lookup fields will work the same, but you are going to have issues with the Update of the Data Card - you really do not need this field type (I do not use it at all) and I would encourage to simply get the values directly ffomr the other list in Power Apps.

     

     

  • Jandal_Power Profile Picture
    101 on 04 May 2023 at 03:15:50
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    I agree with what you said above.
    I would like not to use look ups at all, and want to do things the best practice way.
    I am willing to start my app again from scratch if there are better ways of achieving success.

  • Jandal_Power Profile Picture
    101 on 05 May 2023 at 03:02:17
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Hi @WarrenBelz,

    Question, when you say "I would encourage to simply get the values directly from the other list in Power Apps"
    Do you mean I should ditch the edit form all together and just manually place the fields on my app?
    Then that way I an get the data directly from the source somehow and when it all displays on one screen, use the patch function to save all the information to the data source?

    I am looking into starting again from scratch.

    Regards,
    Jandal_Power

  • WarrenBelz Profile Picture
    151,631 Most Valuable Professional on 05 May 2023 at 04:51:47
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Hi @Jandal_Power ,

    I was referring to Lookup fields in that comment.

  • Jandal_Power Profile Picture
    101 on 07 May 2023 at 20:47:57
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Currently reading through your Blog site, it is very helpful 🙂

  • Jandal_Power Profile Picture
    101 on 10 May 2023 at 22:23:01
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Update - My work around solution.
    As I first created the App with the Power Apps creator, I started with a Home Screen, Browse, Detail and Edit Screen.
    Obviously you go to the edit screen, enter in your details and Submit the form to get an entry.
    But my question to myself was, how do I keep this previous data, make some changes and write it back to the data source as a separate entry? (Submit Form just edits the current entry).

    Then it hit me, the details screen opens your summitted record back into the edit form to modify then submit. If I use a patch command it writes all the data back as a separate record.

    Solution - 
    I copied the edit screen (to keep the possibility of editing a record separate).
    Added a button on edit screen (Copy) to take me to my new cloned "Copy"screen.
    The copy screen is a clone of the edit screen, with a modified additional edit form clone, hide some fields that do not change, and change the submit button to a patch command.

    Patch(
     'YourDataSource',
     Defaults('YourDataSource'),
     EditForm2.Updates //Note*EditForm2 was my EditForm clone (now my copy form)
     );
    Notify(
     "Operation Successful",
     NotificationType.Success,
     1000
    );

    Hope that makes sense. A real rude way to do it, but it works. I know it now lacks the security features of required fields etc, but limiting the options on my copy form should minimize data loss. 

  • WarrenBelz Profile Picture
    151,631 Most Valuable Professional on 10 May 2023 at 22:58:48
    Re: Adding multiple entries into SharePoint list - Trying to find a solution to multiple entry rather than only single item

    Hi @Jandal_Power ,

    Yes - a bit of a workaround, but you are doing something unusual

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 686 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 433 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 266 Moderator

Last 30 days Overall leaderboard
Loading complete