cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ryan_LaCroix
Helper I
Helper I

Filtering a DataTable

Hi,

I am currently trying to find a way to filter my datatable based off dropdowns on the screen. the dropdowns use the same data source as the datatable. One dropdown is the skill platform and the other is the title; and I want the datatable to show the employees that posses the selected skill platform. How should I organize my SortByColumns formula to execute this action?

 

Thanks,

Ryan

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Ryan_LaCroix 

 

SortByColumns( Filter (datasource, column.Value = dropdown.Selected.Value),"Title")

 

where datasource = name of your data source

dropdown = name of the dropdown control

column = name of the column which matches the value in the dropdown (same source)

Title - sort by column name

 

Filter by choice, lookups etc.

https://www.youtube.com/watch?v=pn50AKn3Q1Y

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Ryan_LaCroix 

 

SortByColumns( Filter (datasource, column.Value = dropdown.Selected.Value),"Title")

 

where datasource = name of your data source

dropdown = name of the dropdown control

column = name of the column which matches the value in the dropdown (same source)

Title - sort by column name

 

Filter by choice, lookups etc.

https://www.youtube.com/watch?v=pn50AKn3Q1Y

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

v-monli-msft
Community Support
Community Support

Hi @Ryan_LaCroix ,

 

What is your data source?

What is the column type of skill platform?

Can you please explain more about what did you mean by "show the employees that posses the selected skill platform"? Did you mean that you want to Filter to show all the records of the selected skill platform, then show the "Employees" field in the DataTable control? If so, then you could first make sure that Employees field has been added in DataTable control, then set below formula in the Items property of your DataTable control:

Filter(DataSource1,SkillPlatform1.Value=Dropdown1.Selected.Value)

In this formula, I suppose that your skill platform is a choice column.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,949)