Hello everyone,
I have multiple tables in my PowerApps with same fields, I just want to choose the table whose button has been clicked on the last page. I am able to navigate to the next page with the variable to check which data source should we choose, I have tried to use Switch statement as follows in the Items of the gallery:
Switch(variablefrompreviousscreen,"Match String 1",DataSource1,"Match String 2",DataSource2,DataSource3) but this gives me some errors and doesn't seem to be the solution
Please let me know how i can do this. If not, Please specify alternate approaches: I am thinking about have a single table and using the filter or creating my own collection in PowerApps.
Your help would help me improve based on this
@Anonymous I don't know if you can manipulate the "ITEMS" setting with Switch, but you may be able to achieve what you want by playing with the visibility property using your defined variable variable.
Joel
Hi @Anonymous
I use Set(ds, Datasource1) to create an alias for various datasources or for different filters and use ds as the Items property of my Gallery. However, the datasource of the gallery must match exactly the datasource of the Edit or View form that you navigate to and the problem is that you cannot use a variable as the datasource of a form. If you use a different form for each datasource, you will need set the Item property using a Lookup() to the datasource and a unique field. For example,
Lookup(Datasource1,ID=Gallery1.Selected.ID)
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2