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 / Patching into choice c...
Power Apps
Answered

Patching into choice column in sharepoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to patch a column from a collection gathered from an excel file using this syntax for the patching. 
Patch('ATS - Candidate',ShowColumns(colCandidateTestBulkUpload,"CandidateName","EmailAddress","EndorsedtoColdCalling"));
but I am having problems with the column "EndorsedtoColdCalling" showing the error "Invalid argument type (Table), Expecting a Record value instead."  Is there any way for me to modify my syntax to accommodate the patching into my choice column in SharePoint?

Screenshot 2022-09-26 103026.jpg
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Anonymous ,

    Try this

    Patch(
     'ATS - Candidate',
     ForAll(
     colCandidateTestBulkUpload As aPatch,
     {
     CandidateName: aPatch.CandidateName,
     EmailAddress: aPatch.EmailAddress,
     EndorsedtoColdCalling: {Value: aPatch.EndorsedtoColdCalling}
     }
     )
    )

     

    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.

    Visit my blog Practical Power Apps

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz 

    I tried the code and still it shows the error whenever I get to the
    EndorsedtoColdCalling: {Value: aPatch.EndorsedtoColdCalling} 

     but if I remove it the error goes away

    2.jpg
    1.jpg
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Anonymous ,

    Is this a single or multi-choice column ? Also what type of field is this in the collection ?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz 
    it is single choice and the fields in the collection are strings specifically "Yes" "No" and "Null" value choices. Appreciate your help on the matter.

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @Anonymous ,

    Second part of question - what type of field is it is the collection. If it is a single choice in your list, there are only two possibilities

    Text field from your collection to Choice in list  (as I posted)

    EndorsedtoColdCalling: {Value: aPatch.EndorsedtoColdCalling}

    Choice field in Collection to Choice in List

    EndorsedtoColdCalling: {Value: aPatch.EndorsedtoColdCalling.Value}

     or simply

    EndorsedtoColdCalling: aPatch.EndorsedtoColdCalling

    Can you please re-check the field type in both source and destination

     

    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.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    sorry for the late reply @WarrenBelz 

    it is the Choice field in Collection to Choice in List
    but upon doing both

    EndorsedtoColdCalling: {Value: aPatch.EndorsedtoColdCalling.Value}

    and

    EndorsedtoColdCalling: aPatch.EndorsedtoColdCalling

    the error is still persisting



  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    here is a screenshot of what I am seeing @WarrenBelz 

    3.jpg
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @Anonymous ,
    Sorry to ask again, but are both definitely single choices - it is the only explanation left (one or both are multiple choice columns). This error "Invalid argument type (Table) suggests one of them is multiple choice.

     

    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.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi @WarrenBelz 

    yes the columns in the excel file I am pulling data is single choice and the column in sharepoint I am patching in is also single choice. Correct me if I am wrong I attached the screenshots of the columns respectively

    5.jpg
    4.jpg
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Anonymous ,
    What does the field look like in your collection ?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard