Introduction
In this blog, we will see how to create Data Table layout on the screen, connecting it to your power apps table, using SortByColumns & Search to your data table created.
Add Data table to the screen
1. Rename your screen name for your reference by right clicking screen shown in the below picture
![Power Apps - SortByColumns & Search using Data Table]()
2. Insert the Data Table from the insert tab shown
![Power Apps - SortByColumns & Search using Data Table]()
3. Choose the data source to connect to your data table screen
![Power Apps - SortByColumns & Search using Data Table]()
4. Edit the fields, which you wanted to be added to your data table screen and click close icon.
![Power Apps - SortByColumns & Search using Data Table]()
Insert Search Text box to the Data Table
1. Insert the "Text Input" from the insert tab and set default value "Empty" & Hint text to "Search".
![Power Apps - SortByColumns & Search using Data Table]()
Insert Sort Icon to the datatable columns
1. Insert the sort icon from the insert tab to each columns in the data table
![Power Apps - SortByColumns & Search using Data Table]()
Connect search and Sort to the datatable
1. Add the below expression to the sort icon "Onselect".
![Power Apps - SortByColumns & Search using Data Table]()
2. Also add the below expression to the datatable "Items".
Note:
TextInput1 -->Name of TextBox
cr9b3_phonenumber,cr9b3_name,cr9b3_email --> Schema name of datatable fields
![Power Apps - SortByColumns & Search using Data Table]()
3. Now click the preview icon and check the sort & search functionality
Search
![Power Apps - SortByColumns & Search using Data Table]()
Sort(Ascending, Descending)
![Power Apps - SortByColumns & Search using Data Table]()