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 / Save DataCard edits to...
Power Apps
Answered

Save DataCard edits to sharepoint list

(0) ShareShare
ReportReport
Posted on by 33

Hello, I'm sure something similar has been answered but I am unable to find it.

 

My app has a gallery connected to my SharePoint list on the left side. On the right side has a display form. I want to be able to edit two of the data cards and have it saved to SharePoint using a button. I have changed the data cards DisplayMode = DisplayMode.Edit to allow me to make changes in app. 

 

What do I add to the OnSelect for the button to save any changes to these cards?

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @CStentz,

     

    You will need the SubmitForm function to patch the changes to SharePoint:

     

    SubmitForm(FormName)

     

    Your Form Default Mode will need to be FormMode.Edit.

    The Datasource will be your SP list and the Item property will be YourGalleryName.Selected.

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

     

  • CStentz Profile Picture
    33 on at

    Thank you for the reply. I have receiving an error "The function expects an editable form as its input". 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @CStentz did you also apply the changes regarding Default mode, data source & item to the Form?

  • CStentz Profile Picture
    33 on at

    I'm not able to find the default mode to make the changes.

     

    CStentz_0-1671566075629.png

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @CStentz, you are currently using a Display Form.

    This is mainly used to display data from SharePoint and I would not recommend them to Patch data.

     

    The Form you are looking for is an Edit Form:

    LaurensM_0-1671567257788.png

     

  • LaurensM Profile Picture
    12,516 Moderator on at

    @CStentz if you prefer the display form, you will have to use a Patch function:

    Patch(ListName, GalleryName.Selected, {ChoiceColumn:DataCardValue4.Selected, Title: DataCardValue3.Text})

     

    DataCardValue4 is an example of how to patch a Choice column, DataCardValue3 a Text field.

    Change the card values to the correct names (the name of that dropdown and text field below it).

     

    I hope this helps!

  • CStentz Profile Picture
    33 on at

    Thank you for your assistance @LaurensM , I made adjustments and changed it to an Edit form. That solved my issue.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard