Hello,
i have 10 tables excel which name re table1, table2,..., tables 10 as datasources of my Browsegallery
i created a textbox. I want to use this textbox to call out my gallery datasource, is it possible?
exemple in textbox i write: table1
my browsegallery.item: SortByColumns(textbox.text, price, ascending)
Do we have any solution to make the value of textbox.text become a name of datasources?
My app has so many sources to work with, so i just want to call out the datasource i want to use for this moment.
Thank you for help
Solved! Go to Solution.
@Anonymous
By-Reference of variables, controls and more is not available yet in PowerApps. There are some ideas in the Ideas list for that...feel free to search and vote.
In the meantime, you would add each table as a DataSource in your App and then you could use conditional formulas to determine what you want to get data from.
However, also be aware that you will run into problems if you have tables with completely different columns in them as your Galleries will not be able to resolve the data signatures.
Even though it may sound painful...it's not really - so consider this, you could easily create 10 galleries all tied to the appropriate datasources. Then from your text box (although I would suggest a DropDown of some sort) you can trigger off of it to make galleries visible or not.
Example, Gallery1 is using data source Table1. Set the Visible property to : (textBox.Text="Table1")
This would return true only if Table1 was typed into the text box and thus Gallery1 would become visible. If you have the same type of formulas on all the other Gallery visible properties, they would be false in this situation (Gallery2 visible : (textBox.Text="Table2") would be false - not visible).
So, no, no way to make one gallery and swap the datasource from a text field, but you can get close to it with this solution.
I hope this helps you a bit.
@Anonymous
By-Reference of variables, controls and more is not available yet in PowerApps. There are some ideas in the Ideas list for that...feel free to search and vote.
In the meantime, you would add each table as a DataSource in your App and then you could use conditional formulas to determine what you want to get data from.
However, also be aware that you will run into problems if you have tables with completely different columns in them as your Galleries will not be able to resolve the data signatures.
Even though it may sound painful...it's not really - so consider this, you could easily create 10 galleries all tied to the appropriate datasources. Then from your text box (although I would suggest a DropDown of some sort) you can trigger off of it to make galleries visible or not.
Example, Gallery1 is using data source Table1. Set the Visible property to : (textBox.Text="Table1")
This would return true only if Table1 was typed into the text box and thus Gallery1 would become visible. If you have the same type of formulas on all the other Gallery visible properties, they would be false in this situation (Gallery2 visible : (textBox.Text="Table2") would be false - not visible).
So, no, no way to make one gallery and swap the datasource from a text field, but you can get close to it with this solution.
I hope this helps you a bit.
User | Count |
---|---|
239 | |
116 | |
94 | |
58 | |
32 |
User | Count |
---|---|
287 | |
132 | |
106 | |
63 | |
57 |