I am writing data from a PowerApp to Azure SQL via the SQL connector. The SQL DB (MyDB) has a Table (MyTable) which has columns A, B, C and D. Column A is the primary key and is set for auto-increment. All four columns are set for Not Null values.
I want my collection (col_Mine) in my PowerApp only to contain columns and values for columns A and C.
What I think/wish should happen is this:
Collect(col_Mine,ShowColumns(Patch('dbo.MyTable',Defaults('dbo.MyTable),{B:1,C:2,D:3}),"A","C")) but it doesnt like that.
To make this work now I end up setting a context variable for the entire patch command and then use a separate statement to collect the specific columns from the context variable into the collection.
UpdateContext({cv_temp_Record:Patch('dbo.MyTable',Defaults('dbo.MyTable),{B:1,C:2,D:3})});
Collect(col_Mine,ShowColumns(cv_temp_Record,"A","C"))
Does anyone know of a method to accomplish this in one step like my pseudo-code example above?
Thanks,
Brian