I am trying to patch an entire collection to a SQL server at one time. The collection contains unique values. However when it patches the the SQL server the 1st record gets input for each item.
For example if the collection as 4 records (A, B, C, D), what gets patched to the SQL server is A, A, A, A. The total number of records patched is correct (if there are 50 records in the collection, 50 records will be added to SQL), but it just keeps repeating the data for the 1st record in the collection.
The code I am using follows this structure:
ForAll(CollectionItems,
Patch(SQL.dbo,
Defaults(SQL.dbo),
{Var1: CollectionItem.var1,
Var2: CollectionItem.var2 } ) );
Any idea as to why only the data from the 1st record is being patched? Any help would be greatly appreciated!
@Shanescows @Pstork1