Is that possible to make PowerApps can refer to a column via a variable?
I want to use "Patch" function to update column in Data Source. But the number of columns to be updated and columns name is not fixed. So it would be great of PowerApps to allow dynamically refer to a column.
For example, is it possible to replace the "DataField_8" below with dynamic variable such as "Dropdown2.Selected.Value"?
Patch(dbo_Update, LookUp(dbo_Update, ProductCode=Dropdown1.Selected.Value), {
DataField_8 : TextInput1.Text
})
We hear you and appreciate your patience. Unfortunately this is not easy for us to do. Unlike VBA and other languages, Power Apps is strongly typed and named - everything is well established at compile time. It's one of the fundamental principles of the product. This allows us to detect more errors, optimize, and provide better intellisense during authoring.
Can you tell us more about the scenarios in which this would be helpful? Some examples with code would be great. Perhaps we can find a solution that addresses the need without making field names fully dynamic.