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 / Patch Text column from...
Power Apps
Unanswered

Patch Text column from Collection into Choice Column in Table

(0) ShareShare
ReportReport
Posted on by 321

I have a Dataverse Table with Lookup Column of Person Name form another Table. 

I am using powerapps to create new data which I am storing in a collection with all fields matching Dataverse Table but this time everything in Text format. Now I want to Patch collection data into Dataverse table. What should be right patching format for Lookup Column and Date Columns. 

 

Thanks in Advance

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,699 Super User 2026 Season 1 on at

    Hello @ashokpershad,

     

    You Can easily path Lookup Column in DataVerse using below code

     

    Patch(TABLENAME,Defaults(TABLENAME),{Name:"11",LOOKUPFIELDNAME:LookUp(DESINATIONLOOKUP,'DESTINATIONName'="COLLECTIONLOOKUPNAME") })

     

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • ashokpershad Profile Picture
    321 on at

    @rampprakash  Thanks for your Answer but it is not working. 

    Let me try to explain in detail:

    I have one Table in Dataverse (Manhours) with following columns:

    ashokpershad_2-1635839721793.png

     

    Now I used one FORM for this table. When I press one submit button after filling details in this form I am creating one collection (displayed in Gallery5) too where I am storing all  FORM submit entries. Please note this Submit button actually not for SUBMITFORM function.

    Gallery5:

    ashokpershad_1-1635839285445.png

    Now I want to Patch this Gallery back to my Dataverse Table using this ForAll and Patch functions. 

    I used Following Formula:

     

    ForAll(Gallery5.AllItems, Patch(Manhours, Defaults(Manhours), {WOrder:glry5WO.Text, 'Lab Supervisor':LookUp(Manhours, 'Lab Supervisor'.Supervisor = glry5Sup.Text), 'Service Engineer': LookUp(Manhours, 'Service Engineer'.'Engineer Name' = glry5eng.Text), 'Date Started':glry5DS, 'Date Completed': glry5DE, 'Actual Work Hours': glry5AH.Text, Remarks: glry5Remarks.Text}))

     

    But this formula is showing following error:

    ashokpershad_0-1635841333172.png

     

    What formula shall I use? 

     

    I hope now its clear.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard