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 multiple values ...
Power Apps
Answered

Patch multiple values against same ID using Patch : Expected Number, found Table error

(0) ShareShare
ReportReport
Posted on by 18

I have a table called 'GroupDetails' , with Foreign Key as IM_No. I am using a collection to store the Ind_Id from a Gallery, as

 

Collect(IndinGroup, {Ind_Id: ThisItem.Ind_Id})

 

The table should look as follows. IM_No 1 already exists in the Master Table.

 

Ind_IdIM_No
11
21
31

 

I am Using:

ForAll(IndinGroup,Patch('[dbo]..[Group_Details]',Defaults('[dbo].[Group_Details]'),{Ind_Id: IndinGroup[@Ind_Id], IM_No: Value(varIMRecord.IM_No)})

 

This gives me the error 'Expected Number for Ind_Id. Received Table'.

 

What am I doing wrong? Please help.

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @pralikab931 ,

    I am not sure this is the issue, but if you choose View > Collections > IndinGroup and can see a single value (not a table) in Indin_Id, the try this

    ForAll(
     RenameColumns(
     IndinGroup,
     "Ind_Id",
     "IndID"
     ),
     Patch(
     '[dbo]..[Group_Details]',
     Defaults('[dbo].[Group_Details]'),
     {
     Ind_Id: IndID, 
     IM_No: Value(varIMRecord.IM_No)
     }
     )
    )

     

    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.

     

  • pralikab931 Profile Picture
    18 on at

    It gives me a Foreign Key Conflict error. Insert statement conflicted with the Foreign Key Constraint. Ind_Id is also a foreign key here. I'm sorry I forgot to mention that.

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

    Hi @pralikab931 ,

    From what I understand, you you cannot Patch to that. Do you need to change it?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard