Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Suggested answer

PowerApps not recognising Sharepoint columns when patching a collection

Posted on by 4
Hello, 
 
I am trying to Patch a collection into a Sharepoint list. I have named the columns of the collection exactly the same as the Sharepoint list but it’s throwing an error which says “there is not a column called x in Sharepoint list, the closest named column is x”. I have tried multiple ways of patching but it simply won’t recognise the columns…. What am I doing wrong? 
  • ronaldwalcott Profile Picture
    ronaldwalcott 1,058 on at
    PowerApps not recognising Sharepoint columns when patching a collection
    Are these the actual field names? Show the SharePoint list details the collection details and indicate how you update the collection.
     
    Are you sure that the collection is populated before the Patch runs?  
  • SteffTurton Profile Picture
    SteffTurton 4 on at
    PowerApps not recognising Sharepoint columns when patching a collection
    The coding to add the data to the collection is:
     
    Collect(ColFireDoorForm, {'Title':DataCardValue1.Text,  
    'field_1': DataCardValue15.Text,
    'field_2':DataCardValue12.Text,
    'field_3':DataCardValue13.Text,
    'field_4': DataCardValue14.Text
    })
     
    I can see that the data has collected as required, but when I try to patch the collection to the data source it simply doesn’t send it- despite not showing any errors in the code? 
  • Suggested answer
    CA1105 Profile Picture
    CA1105 222 on at
    PowerApps not recognising Sharepoint columns when patching a collection
    Usually non required columns doesn't create any problem if you do not patch them and you are already using Default function so you should be good. Did you try patching the item into collection and see if it is patching? There might be some minor issue which we need to see.
  • SteffTurton Profile Picture
    SteffTurton 4 on at
    PowerApps not recognising Sharepoint columns when patching a collection
    I have tried changing the Sharepoint columns to the back end names and the good news is that there are no longer any errors showing, however it simply isn’t Patching and data back to the list. Example of coding: 
     
    ForAll(ColFireDoorForm, Patch(FireDoorInspections, Defaults(FireDoorInspections),{Title:Title, field_1:field_1, field_2:field_2, field_3:field_3, field_4:field_4}))
     
    There are many more columns in the list but they are not set to require data so should that make any difference? 
  • ronaldwalcott Profile Picture
    ronaldwalcott 1,058 on at
    PowerApps not recognising Sharepoint columns when patching a collection
    Did you create the collection based on only the items which you added to the SharePoint list and ignored the system generated items?
    If not, remove the system generated items which you added to the collection.
  • Suggested answer
    KBpwr Profile Picture
    KBpwr 55 on at
    PowerApps not recognising Sharepoint columns when patching a collection
    Have you tried looking at the backend column name and using that instead of what you see in the SharePoint list?

    For example in some of my lists, we have things like Empl ID:


    But when I go settings > list settings:



    The column is actually called something else when you look in the browser bar inside of the edit column:




     
    Try using whatever Field= value is from the actual browser address in Chrome/Edge/your browser. It will be the very end of the address.

    You may have tried this since it can be a common issue in SharePoint but worth checking out. Can you post more of your code/screenshots and maybe that will help troubleshoot this as well?

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard