cancel
Showing results for 
Search instead for 
Did you mean: 

Allow dynamic column names

Your documentation reads:

RenameColumns
TableOldColumneNameNewColumnName )

  • OldColumnName - Required. Name of the column to rename. This name must be a string (for example "Name" with double quotes included).
  • NewColumnName - Required. Replacement name. You must specify a string (for example, "Customer Name" with double quotes included) for this argument.

 

My suggestion is to fix this so that you can either 

a) Pass any valid string variable to this function.. or..

b) Change the way DisplayName works for columns.

Status: Need Info

@agneum are you looking specifically just to change the display name of the column, or also its data type? The latter -- consuming data sources with dynamic schema -- is a large work item for canvas apps which are currently very strongly typed, but important for many scenarios and something we are planning for now. Flagging @LanceDelano and @GregLi here.

Comments
PowerApps Staff rc
PowerApps Staff
Status changed to: Need Info

@agneum are you looking specifically just to change the display name of the column, or also its data type? The latter -- consuming data sources with dynamic schema -- is a large work item for canvas apps which are currently very strongly typed, but important for many scenarios and something we are planning for now. Flagging @LanceDelano and @GregLi here.

Level 8

 @rc: Well, what I am looking for now just to be able to change the display name of the columns. The DisplayName property for Data Table control doesn't seem to work properly, as it changes expressions to constants which I was told will be fixed in a couple of weeks by Staff CarlosFigueira.


D

Level: Powered On

I need this, and what I'm looking to do is the following:

A bunch of survey questions that I have, and want to create a powerapp out of. I want the questions referenced with an ID in an excel spreadsheet, and then I want to use those question numbers for the column of my table, and be able to dynamically save the data to each question in the corresponding column. My only option at the moment is to manually go through 36 questions and create individual slider bars for each. If I could do this dynamically, I could be done with this app in a couple hours. Very sad I can't reference a column name with a variable. 

Level: Powered On

I am hoping for a work around for horizontal scrolling in a vertical gallery using slider bar. The slider bar dynamically build the column name as a global variable (WeekNumber), and it would be nice to be able to change the column name to the global variable, and the default of the column to be ThisItem.WeekNumber, instead of the actual column name (fixed).

 

Level: Powered On

Definitely need the ability to put text variable as a parameter for creating column name. This is needed when you are creating collection from dynamic table. 

(I am trying to switch columns and lines in collection and I need to make it without hard coded column names)