I have multiple galleries on one screen. Depending on what the user clicked on the previous screen, that relevant gallery will be the only one visible. I tested this method out using these lines in the 'visible' property of each gallery:
(ListBox1.SelectedText.Value = "Table1")
(ListBox1.SelectedText.Value = "Table2")
(ListBox1.SelectedText.Value = "Table3")
etc.
This equates to 'true' and the gallery appears. I have to do this now for over 50 galleries so I was then thinking that in order to save repeating code, I could set a variable (tableName) to the ListBox1.SelectedText.Value and just have each visible property like this:
(ListBox1.SelectedText.Value = tableName)
Only problem now is all galleries are now visible. Is this a bug with PowerApps and variables as the var tableName is exactly the same as typing the listbox selected value as a string? Maybe variables don't work that way in PowerApps but if anyone has any ideas please share.
Thanks.