cancel
Showing results for 
Search instead for 
Did you mean: 

Patch - Referance a column name via a variable

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
})
Status: Under Review

Updating status and adding @GregLi

Comments
Level: Powered On

This is an important feature that enables easy data filtering and sorting in the app.  The alternative is writing big switch statements. 

Level: Power Up

Every programming language that I've seen has a way to do this. Eventually I think widespread adopting of PowerApps will be dependent upon this feature.

PowerApps Staff
Status changed to: Under Review

Updating status and adding @GregLi

Level: Powered On

As it stands, the only work-around I have for my app is to use a Switch case so that I can call the text literal for each individual column name. In a list with potentially dozens of iterative fields, the ability to call a specific column by variable would significantly improve the accessibility of the data I need. I'm gonna keep a close eye on any updates on this.

Level: Powered On

This is pretty critical of a feature. If we can please have this prioritized. It will prevent a bunch of embedded if statements. With many of us coming into this with Excel VBA knowledge, it doesn't make sense why it's not there yet. The work arounds are very convoluted.

Thanks!

Level: Powered On

Adding a comment in hopes this will change from under review to under development... unless there has been some work done on this for which I am unaware?

 

Thanks for the work your team does on PowerApps!