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!
Solved! Go to Solution.
I've figured it out:
ForAll(UserCounts,UpdateIf(Stock, Id=Stock_ID, {Qty_Count: LookUp(UserCounts, Stock_ID = Id, Qty)}))
I've figured it out:
ForAll(UserCounts,UpdateIf(Stock, Id=Stock_ID, {Qty_Count: LookUp(UserCounts, Stock_ID = Id, Qty)}))
User | Count |
---|---|
252 | |
107 | |
88 | |
51 | |
44 |