Filter Gallery using Dataverse Views in Power Apps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone reza here in this video i will show how we can leverage dataverse table views directly inside canvas powerapps we will provide a dynamic view selector option which will apply the filtering and sorting logic applied to the view directly to the dataverse data inside powerapps so let's check it out in action [Music] in power apps when we need to filter data coming in from our data source we provide filtering options in the form of controls which allows the user to filter the data in this scenario i have a table in microsoft dataverse that is storing device information if i would like to see all the devices that are currently in assigned status i will pick the status as assigned if i would like to see the devices that are assigned related to the manufacturer's samsung i can select that and see that information here if i select reset it will reset the filter on the gallery the items property of the gallery control is where we need to define the filter formula however with microsoft dataverse as a data source if i head over to my tables and go to the devices table if i head over to views these are the views that have been created and are specific to my devices table back to my power app my gallery control is connected to my table of devices one key feature you get when you connect to microsoft dataverse be it the full version or dataverse for teams is an additional feature of selecting views i have a view called assigned devices if i select this it will apply the filtering and sorting logic that has been defined in the back end view directly to my gallery control here if i want to create a new view to showcase all my devices that are in repair i will head over here to add view enter a name for my view and click create in the view creation experience on the right hand side we have the ability to define our filters if i select this it will open the filtering experience i will head over to add and add a new row to show all the devices in the repair status i will pick my device status column subtype text i have multiple options here to choose from i'll pick where the status of the device is equal to in repair and i can add additional conditions i can even group conditions and run them under and or or operators in this case i'll apply a single filter click ok and publish my view back to my power app now if i look at my list of views i have my view called devices in repair if i select this view it will only show me the devices that are in that specific status to make this even more dynamic we can provide the views as an option for the user to select to do that i will insert a drop down control for my gallery control which has a view applied currently if we look at the items property there is a filter being applied on my table and there's this property called devices of views this is the name of my dataverse table and views will list out all the view names as an enum so if i do view dot it will list out all the views for my table so this enum devices of views is what i will go ahead and copy go to my drop down control and for the items property i will use the following function choices of my views enum so this will list out all my views and now to connect the selected view of this drop down control with my gallery for the items property of the gallery filter my table of devices with my drop down control name dot selected dot value now if i preview the app we will see this live in action here assign devices the view has the filter to only show devices assigned if i change this to available devices it will show me all the devices that are available and so and so forth the advantage of this approach is we define our views in the back end we do not have to come back to powerapps and make changes to our app to apply the new filters as the views change automatically the back-end filtering logic would be put in place we also have the ability to deactivate views so if there are views that you do not want to show in that drop down list i can simply go and deactivate them right here so i have deactivated the assignment history and available devices view those two views are not listed here anymore also there are some standard out of the box views that come along with your dataverse tables if you want to only showcase specific views you can follow some sort of naming convention in my case i have my view name starting with an underscore so for this drop down control i can apply a simple filter condition filter my set of views where i'll use the startswith function the value that's the name of the view starts with underscore now if i preview my app it will only show me those views where the names begin with underscore and that are active my assignment history view i will go ahead and activate this if you look at this view for the filter condition i am filtering based on a related table dataverse allows us to create table relationships with these views we also have the power to connect to our related tables in this case the filter that i'm applying for my view states get me all those devices that have a device assignment history so every time a device is assigned to a specific user i make an entry in this related table here if i was to select assignment history it will list out all those devices that have a history associated with it if you observe the gallery there is an extra icon that i am showcasing here when i select that for a specific device it will navigate the user to the assignment history screen and showcase the historical information for that specific device the same concept also works in microsoft dataverse for teams here i have a power app that is showcasing expense reporting information once again i have leveraged that view concept right here show me all the travel related expenses so i have three expenses here that have related line items that have the category transportation i have another view here that shows me all the expenses that are approved and have a category related to transportation greater than 50 here i have only one such expense and in dataverse for teams you head over to the powerapps app for teams select your specific team head over to see all go to tables this will list out all the dataverse tables specific to that team here is my expenses table once again we have the ability here to create views i'll add a view i've called this food related expenses view i'll click create for my view i will head over to filters on the right hand side to show all the expenses that have the expense status equal to approved and i will add a related table which is my table of line items and the category should be equal to food and beverage i can add additional filters here for example the cost should be greater than 30 dollars there are many other options here for example if you pick date columns there are various predefined filters that you can select from once you have your filters in play i'll click ok i can even define the sorting for my specific view i'll sort this by name and i'll click publish once my view is published i will head back to my microsoft team and relaunch my power app i have not gone ahead and modified and republished my app this app is directly connected to the views associated with my expenses table that i'm listing out right here and i can see my food related expenses if i select this it will filter my data to only show those expenses where the status is approved and have a line item that is related to food and beverage and the value should be greater than 30 dollars if you enjoyed this video then do like comment and subscribe to my youtube channel and thank you so much for watching
Info
Channel: Reza Dorrani
Views: 1,303
Rating: undefined out of 5
Keywords: filter gallery, filter gallery powerapps, powerapps gallery multiple filters, power apps, microsoft dataverse, powerapps, dataverse, how to, filter, powerapps filter dataverse, microsoft power apps, dynamic views powerapps, reza dorrani, powerapps filter by view, powerapps filter gallery by view, powerapps dataverse, powerapps dataverse views, dataverse views in canvas app, dataverse table views, microsoft dataverse views, dataverse for teams views, powerapps use dataverse views
Id: eKygMP7ySR8
Channel Id: undefined
Length: 10min 17sec (617 seconds)
Published: Mon Dec 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.