cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Updateif collection from a collection 'Incompatible type' error

Hi,

 

I want to update a collection with a value from another collection both of which are taken from SQL Server.

 

Error: 'Incompatible type. The 'Count_Qty' column data source you're updating expects text a 'Text' type and you are using 'Table' type.'

 

UpdateIf(Stock, Id=UserCounts.Stock_ID, {Qty_Count: UserCounts.Qty})

 

if it was an SQL query it would look like

 

UPDATE Stock
SET Qty_Count = u.Qty
FROM Stock a
JOIN UserCount u ON a.id= u.Stock_ID

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

I've figured it out:

 

ForAll(UserCounts,UpdateIf(Stock, Id=Stock_ID, {Qty_Count: LookUp(UserCounts, Stock_ID = Id, Qty)}))

View solution in original post

1 REPLY 1
Highlighted
Frequent Visitor

I've figured it out:

 

ForAll(UserCounts,UpdateIf(Stock, Id=Stock_ID, {Qty_Count: LookUp(UserCounts, Stock_ID = Id, Qty)}))

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,481)