Skip to main content

Notifications

Community site session details

Community site session details

Session Id : KzhphsZwHzblZmr08GJA8h
Power Apps - Building Power Apps
Suggested answer

Office 465 writing back to SharePoint List

Like (0) ShareShare
ReportReport
Posted on 11 Dec 2024 19:06:58 by 188
- We are using the new forms and objects. Not classic
- We are connecting to Office 365 and we use this in a combobox. This works great.
- We then need to write this back to the Sharepoint list but it's not working. I'm trying the patch function based on my searches.
 
 
SharePoint List name = 'Testing'
SharePoint Column Name = AdditionalCC
Datacard Name - AdditionalCC
 
I am so lost in how to get this to work. I assume I put the code in the "Update" property of the value cared. 
 
Help!
Categories:
  • WarrenBelz Profile Picture
    146,518 Most Valuable Professional on 11 Dec 2024 at 21:38:04
    Office 465 writing back to SharePoint List
    Please post (in Text) the code in the Items of the Combo Box and the Update of the data card. Also is that the Data Card or Combo Box name ? Either way, you will need to rename it as it cannot be the same as the field name.
  • Suggested answer
    Robu1 Profile Picture
    1,147 Super User 2025 Season 1 on 11 Dec 2024 at 21:26:47
    Office 465 writing back to SharePoint List
     
    Thank you for choosing Microsoft Community.
     
    You're on the right track with using the Patch function.
     
    Here's how you can update the SharePoint list with the selected value from your combobox:
     
    Set the Update Property: You are correct that you need to set the Update property of the DataCard. This property should be set to the value selected in your combobox.
     
    Patch Function: Use the Patch function to update the SharePoint list. The Patch function allows you to modify or create records in a data source.
     
    Here’s a step-by-step guide:
    Set the Update Property of the DataCard:
    Go to the DataCard for the AdditionalCC field.
    Set the Update property to the value of the combobox. For example:
    Combobox.Selected.Value

    Use the Patch Function:
    In the OnSelect property of the button (or wherever you want to trigger the update), use the Patch function to update the SharePoint list. Here’s an example:

    Patch(
        'Testing',
        Defaults('Testing'),
        {
            AdditionalCC: Combobox.Selected.Value
        }
    )
     
    This code will create a new item in the 'Testing' list with the value from the combobox.
     
    If you want to update an existing item, you need to specify the item to update. For example:

    Patch(
        'Testing',
        LookUp('Testing', ID = ThisItem.ID),
        {
            AdditionalCC: Combobox.Selected.Value
        }
    )
    This will update the item in the 'Testing' list where the ID matches the current item.
     
    If you need more detailed steps or run into any issues, feel free to ask!

    If this Post helped you, please click  "Does this answer your question" and like this post to help others in the community find the answer too!

    Happy to help.

    Robu 1

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,749 Most Valuable Professional

Leaderboard
Loading started