cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nikhil2
Resolver II
Resolver II

Combox to filter DataTable

Hello Team,

 

Greetings for the day!

 

At the moment, i have a DataTable pulling data from Sharepoint(Sort,Search,Filter) below is the code which i am using for DataTable

Sort(Search(Filter('03. Project Costs',(Author.DisplayName=User().FullName),If(Project_x0020_Category="Project Costs",Or(Title=ComboBox3.Selected.Title) || (Title=ComboBox3.SearchText)),And(Created_x0020_Date0>=DatePicker1.SelectedDate, Created_x0020_Date0<=DatePicker3.SelectedDate, Or(Project_x0020_Category="Project Costs"))),TextInput1.Text,"Title","Report_x0020_Month_x002f_Year_x0"),Created_x0020_Date0,Descending)

 

1.What i need to for an output is, i have a combo box i need to filter the DataTable using the combo box

2.(Author.DisplayName=User().FullName) I have used this line of code, because i want only that user to access the which he has submitted.

3. Same way i need to have a combo box dropdown where user needs to see what he submitted or he has access to the item. For ex: item1 and item 2 is under name ABC and item 3 and item 4 is under name XYZ. If i login as ABC i should see only item 1 and 2 in the combo box.

4. When i see only 1 and 2, the DataTable should be avaliable with data without filtering. If i select 1 should filter 1, if i select 2 should filter 2. At last if i cancel both all items from 1 and 2 should be visible.

 

And also is to possible to filter multiple selection in combo box, if yes please do the needful.

 

Thanks and regards,

Nikhil

2 REPLIES 2
v-micsh-msft
Community Support
Community Support

Hi @Nikhil2,

 

So the requirements here is to filter the datatable with the ComBox Selection?

I think the formula you provided is having some problems with the Or(), and () function added under the Filter expression part.

Filter('03. Project Costs',
(Author.DisplayName=User().FullName),
If(Project_x0020_Category="Project Costs",
Or(Title=ComboBox3.Selected.Title) || (Title=ComboBox3.SearchText)),
And(Created_x0020_Date0>=DatePicker1.SelectedDate,
Created_x0020_Date0<=DatePicker3.SelectedDate,
Or(Project_x0020_Category="Project Costs")))

Could you please explain a bit for the or() , together wiht the And() function used here?

 

Beisdes, if you could share a sxcreenshot for what you would like to achieve, then it would be much appreciated.

 

Filter with ComBo Box control should work, but the first thing is to confirm whether the combo box has enabled the SelectMultiple, as the formula would be different if this property has been enabled.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Nikhil2
Resolver II
Resolver II

Hello Micheal,

 

Thanks for the reply!

 

Foremost i have skipped the formula to dropdown now, but i need the Multiple selection combo box.

 

Formula : Sort(Search(Filter('03. Project Costs',(Author.DisplayName=User().FullName),If(IsBlank(Dropdown6.Selected.Value),true,Title=Dropdown6.Selected.Result),And(Created_x0020_Date0>=DatePicker1.SelectedDate, Created_x0020_Date0<=DatePicker3.SelectedDate, Or(Project_x0020_Category="Project Costs"))),TextInput1.Text,"Title","Report_x0020_Month_x002f_Year_x0"),Created_x0020_Date0,Descending)

 

Below Combo box provides the all the information from one of the datasource Column "Title". PIN is the column i want to filter internal name "Title".

 

1.If you glance to the below combo box i can view list of items, perhaps i have access to only 2 items which are "P19" and "P26".     I need to access the combo box with only 2 options which is authorized to me.

2. If i select "P19" result should show only for that or "P26" only that, if i select both i need to filter both like Mulitple selection.

     Note: "P19" and "P26" are example items can grow to 5 or 6. That's why i need to make multiple selection.

3. If i dont select anything should result to all items.

 

 

Capture.PNG

 

Thanks and Regards,

Nikhil.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,152)