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 / Need help with updatin...
Power Apps
Answered

Need help with updating a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 15

Originally the Powerapp I created for our company (a basic onboarding form which stores the info in a Sharepoint list) worked without issue. Since Powerapps has been updated over the last year, the functionality has slowly been breaking. Now, the issue is what used to work as a SubmitForm no longer does, with the following error:

 

image.png

I gather the SubmitForm needs to change to an Update function, but I'm lost as trying the function previously would error out *and working with Microsoft's techs previously*, SubmitForm was the fix!

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Is ListID a column in SharePoint that you created?

  • WarrenBelz Profile Picture
    153,462 Most Valuable Professional on at

    Hi @JFrisbee ,

    You seem to have to Data Cards both trying to update the field ListID. Remove one of them.

     

    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.

  • JFrisbee Profile Picture
    15 on at

    Hi Jeff, yes - ListID is an index column I created in the Sharepoint list (the app would not index with the default Index column, so it is untouched/ignored).

  • JFrisbee Profile Picture
    15 on at

    I've reviewed all the cards on the form, and ListID_DataCard1_1 is the only one - it's also hidden, as it behaves as an index.

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

    Is the ListID column in SharePoint set to Enforce unique values?

  • v-xida-msft Profile Picture
    on at

    Hi @JFrisbee ,

    Is the "ListID" column a custom Number column in your SP List?

    Have you taken a try with Patch function to update/add items in your SP List?

    Further, have you enabled "Enforce unique values" option for your "ListID" column?

     

    Regarding the error message that you mentioned, it seems to tell that you are updating the "ListID" column with duplicates value. Please check if you have enabled "Enforce unique values" option for your "ListID" column as below:

    2.JPG

    If yes, please disable the "Enforce unique values" option for your "ListID" column in your SP List, then try your SubmitForm function in your canvas app again, check if the issue is solved.

     

    In addition, if you want to add new entry or update existing items in your SP List, the Patch function could also achieve your need:

    For Adding new entry:

    Patch(
     'Your SP List',
     Defaults('Your SP List'),
     EditForm1.Updates
    )

    or

    Patch(
     'Your SP List',
     Defaults('Your SP List'),
     {
     Title: "xxxx",
     Column1: "xxxx",
     Column2: "xxxx",
     ...
     }
    )

     

    For updating existing item:

    Patch(
     'Your SP List',
     LookUp('Your SP List', ID = BrowseGallery1.Selected.ID),
     EditForm1.Updates
    )

    or

    Patch(
     'Your SP List',
     LookUp('Your SP List', ID = BrowseGallery1.Selected.ID),
     {
     Title: "xxxx",
     Column1: "xxx",
     ...
     }
    )

     

    If you want to populate the "ListID" column with Auto-Increment value when you add a new entry in your SP List, please try the following formula:

    Patch(
     'Your SP List',
     Defaults('Your SP List'),
     {
     Title: "xxxx",
     ListID: CountRows('Your SP List') + 1,
     ...
     }
    )

     

    Best regards,

  • JFrisbee Profile Picture
    15 on at

    Thanks Kris, Jeff -

     

    I've turned off unique values, and tried to use the Patch function, with the same relative errors I encountered when I first set the app up. Currently it isn't patching, and doing a search for ListID in a Lookup gives me the error "This formula uses scope, which is not presently supported for evaluation". I tried pointing to the data card (which is hidden), which gave me the ListID number stored (both in the Sharepoint list and Powerapps as a number) but because it sees the data card as a *text* field, it regards it as text and therefore the wrong format.

     

    Also, somewhere I have ScheduledOnboarding.Selected.ListID as an option, and I have NO idea where in the app the variable is.

     

     

  • v-xida-msft Profile Picture
    on at

    Hi @JFrisbee ,

    Could you please share a screenshot about the issue?

     

    Actually, the "This formula uses scope, which is not presently supported for evaluation" message is not an error, it is just a Intelligence prompt message from the Formula bar box in your PowerApps Studio (it's a normal behavior).

     

    Please refresh your SP List data source manually before executing the Patch function, then check if the formula works well. Also please consider remove the old SP List connection from your canvas app, re-create a new connection to your SP List from your canvas app, then check if the issue is fixed.

     

     

    Do you want to bind the ScheduledOnboarding.Selected.ListID formula to the ListID_DataCard1_1? Please set the Default property of the Text Input box within the ListID_DataCard1_1 to following:

    ScheduledOnboarding.Selected.ListID

     

     Best regards,

  • JFrisbee Profile Picture
    15 on at

    What am I going to screenshot? The error? The process of it not updating?

     

    I removed & reconnected to the Sharepoint list, which didn't change anything visibly.

     

    I was able to get it to work a few times with the following code on the submit button:

    Patch (
    Onboarding,
    LookUp(
    Onboarding,
    ListID = DataCardValue1_2.Text
    ),
    Form1_2.Updates
    );Navigate(HRLanding,ScreenTransition.Fade)

     

    After a save and refresh, now I get the error:

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

    Hi @JFrisbee ,

    Could you please share a screenshot about the error in your canvas app?

    Have you taken a try to re-generate a new app based on your SP List data source?

     

    Please consider modify your formula as below:

    Refresh(Onboarding); // Add formula here
    Patch (
     Onboarding,
     LookUp(Onboarding, ListID = Value(DataCardValue1_2.Text)),
     Form1_2.Updates
    );
    Navigate(HRLanding,ScreenTransition.Fade)

     

    Best 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

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
Kalathiya Profile Picture

Kalathiya 419

#2
WarrenBelz Profile Picture

WarrenBelz 397 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 345 Super User 2025 Season 2

Last 30 days Overall leaderboard