Hello,
I would like to know if there is any way to make the "ThisItem." of the gallery to be dynamic based on a variable.
Scenario:
1) I have a flow in Power Automate that lists rows in different files and tables in Excel and sends them to Power Apps;
2) When reading in Power Apps I use Set(response, ParseJSON('flowName'.Run().response));
3) And then in the gallery I use Table(response) in the Items property;
4) To show data from a column, I'm adding a Text field and including this Text(ThisItem.Value.NameOfTheColum). It's working as expected.
The point is that I have more than 30 tables in Excel to read. And for all tables the name of the first column is different. This way I would need the Text(ThisItem.Value.NameOfTheColum) field to be dynamic based on a variable.
For example, for the ideal scenario:
Set(varColumnName, Combobox.Selected.Value) - This combobox would list all the options for the names of the first columns of the different tables.
And then use it in the gallery to obtain the data from the first column:
Text(ThisItem.Value.varColumnName)
When I do this, it doesn't return any errors in the formula, but it doesn't show me any data in this field.
So I would like to know if there is any hidden function or any way I can achieve this.
Thanks!