cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

data source selection

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: data source selection

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

1 REPLY 1
Super User
Super User

Re: data source selection

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,148)