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

Re: Updateif collection from a collection 'Incompatible type' error

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

Re: Updateif collection from a collection 'Incompatible type' error

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!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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