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 / Unable to save all the...
Power Apps
Answered

Unable to save all the datacard values into save button

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I'm new to PowerApps and trying to find a way to solve my issue. I've a SharePoint list from which I want users to lookup,edit or add data. The only issue is I cannot use the SP list directly cause it gives me a simple form that's not what the business folks need. They have a template as seen in the screenshot that they want to store the data in.

I created a scrollable canvas app and from the main screen I want to go into next screens based on if the user wants to add data or lookup or edit. For this I used multiple DataCard and in each datacard there's data field that's connected to the sharepoint list fields (eg. Name field in SP list is corresponding to Name filed in powerapps by "Patch(SP_List, {Name:TextInput1}))")

The issue is I'm trying to gather all the field values from all this datacards and store it in the SP list by using a Save button. In the same way I need to edit all those fields or lookup all those fields from the same custom template that's created.

How can I achieve this? Is there a simpler way to do it by using the same format of the word template that we have?

 

Appreciate your help in this regards!

TrailerFormat.png
Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi, are you suggesting you do not want to use the standard forms that come with PowerApps? If so, you can create your own datacards and create your own form. For saving any edits, you would have to use Patch instead of SubmitForm. Let me know if this is in line with your question and I can share more details. 

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about your scenario?

    Do you want to use the same template to add, view or edit records in your SP List?

     

    Based on the needs that you mentioned, I think PowerApps could achieve your needs. If you want to add new record into your SP List, you need to reset all data card controls within this template firstly. And you need to set up a variable to store the current operation status (New, Edit or View).

    Add a "+" button within your template, set the OnSelect property to followingh:

    Reset(TextInput1);
    Reset(TextInput2);
    ...
    Reset(Dropdown1);
    ...;
    Set(OperationStatus, "New")

    Add a "Edit" icon within your app template, set the OnSelect property to following:

    Set(OperationStatus, "Edit")

    Add a "View" button within your app template, set the OnSelect property to following:

    Set(OperationStatus, "View");

     

    Set the Default property of the TextInput1 to following:

    If(
     OperationStatus = "Edit" || OperationStatus = "View",
     LookUp('YourSPList', PrimaryColumn = "specific value").Column1 /* <-- retrieve the record you want to edit, then get the corresponding column value */
    )

    Set the Default property of the TextInput2 to following:

    If(
     OperationStatus = "Edit" || OperationStatus = "View",
     LookUp('YourSPList', PrimaryColumn = "specific value").Column2
    )

    ...

    ...

     

    Set the OnSelect property of the "Submit" button to following:

    If(
     OperationStatus = "New",
     Patch(
     'YourSPList',
     Defaults('YourSPList'),
     {
     Name: TextInput1.Text,
     ...
     }
     ),
     OperationStatus = "Edit",
     Patch(
     'YourSPList',
     LookUp('YourSPList', PrimaryColumn = "specific value"),
     {
     Name: TextInput1.Text,
     ...
     }
     )
    )

    Please take a try with above soluton, then check if the issue is solved.

     

    In addition, I also think the standard Forms control (Display form & Edit form) in PowerApps could also achieve your needs. You could consider create your app using the standard Forms control, connect the Form control to your SP list, then these fields from your SP list would be generated as field data cards within the Edit form automatically. You could also add custom data card within the Form cnotrol. More details about Form controls in PowerApps, please refer to the following link:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-forms

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for the detailed explanation 🙂 The reset worked perfectly fine.

    The issue I still have is I'm unable to save the data. When I fill the fields and save the data it stores empty result in my SP list. However, if I make any changes to date it's able to recognize that. Please see the screenshot attached.

    for the field NameInput_1 the OnSelect property I've is Patch(SP_List, {Name:Value(NameInput_1.Text)}) and on the save button the command that I've applied to test few fields is 
    If(
    OperationStatus = "New",Patch(SP_List, Defaults(SP_List),{Name:Value(NameInput_1.Text),Date:DatePicker1_1.SelectedDate,Carrier:Value(CarrierNoInput_2.Text),TrailerNo:Value(TrailerNo.Text)});Navigate(HomeScreen,Fade)).

    2019-11-08_13-19-46.png
    2019-11-08_13-19-46.png
    2019-11-08_13-16-30.png
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Actually, scratch that I see where I was wrong. While saving i was using Patch(SP_List, Defaults(SP_List),{Name:Value(NameInput_1.Text)}) which was causing it to save null entry. When I removed the Value from the formula it saved perfectly.

    Now the issue I'm stuck with is it is unable to fetch data from SP list and show on the document 😄

    Can you suggest me something on it?

     

    Thank you so much for your help in this regards 🙂

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard