cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BO55VXR
Level: Powered On

Azure SQL Database with "views"

I have an Azure SQL database that has VIEWS implemented to show different data sets ... The columns are all the same, the views just have different filtering conditions.

 

Is there any way to change the datasource of GALLERY to use a different VIEW depending on the value of a user selectable Drop Down List...

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Azure SQL Database with "views"

It is possible. You would need to had each view to the app as a datasource and then use an IF() or Switch() statement in the Items property of the Gallery() to use the view associated with the selected item in the dropdown.

 

Example:

Switch(dropdown.Selected.Value, "A", 'View A', "B", 'View B', "C", 'View C', 'Default View')


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
2 REPLIES 2
Super User
Super User

Re: Azure SQL Database with "views"

It is possible. You would need to had each view to the app as a datasource and then use an IF() or Switch() statement in the Items property of the Gallery() to use the view associated with the selected item in the dropdown.

 

Example:

Switch(dropdown.Selected.Value, "A", 'View A', "B", 'View B', "C", 'View C', 'Default View')


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
BO55VXR
Level: Powered On

Re: Azure SQL Database with "views"

Cool.... I'll give that a try next week ... Thanks.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Top Kudoed Authors
Users Online
Currently online: 279 members 4,083 guests
Recent signins:
Please welcome our newest community members: