cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver III
Resolver III

Filter dropdown on combination of columns

Hello Y'all,

 

I have a SP list with 2 columns

Available Dates

Available Times

 

i build an app where these dates are normal dropdown values, instead of dates.

i want to filter the 'Available Times' in the 'Available Dates' and only give back when there is no combination of that date and time existing in the list.

 

For example,

 

if i choose the 1st of december, and there already have a row that has that date, with the time 09:00, i want this time to NOT show up in the dropdown.

 

Endgoal: 

 

Have every row be unique, so we have one date and one time per row.

 

Hope you can help, thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @PVosEska ,

 

Thanks, please try this:

Filter(Choices(Interviews. 'Available Times'), !(Value in Filter(Interviews, DateCombobox.Selected.Value in 'Available Dates'.Value).'Available Times'.Value))

 Best regards,

Sik

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Hi @PVosEska ,

 

What are the date types of these two columns? What are the items properties of drop-down controls? Can you share some screenshots with your apps?

 

You can refer to this formulas, It doesn't mean this formulas is absolutely right, the exact expression needs more details you need to post. However you can get some reference. 

Filter(<Items of Times drop down>, !(<Field of Times drop down> in Filter('SP list',  DateDropDown.Selected.Value in 'Available Dates').'Available Times'))

The table which needs to be filtered should be Items of dropdown, and logical test statment is to filter out the SP list items first that contains Date drop down selected date, then judge and get all Time dropdown items, that is not in just filtered SP list items.

Hope this can help.

Best regards,

Sik

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

 

Highlighted

Sorry, i thought i gave most of the details

 

they are 2 simple choice columns

In PowerApps, they are comboboxes.

 

The formula's for the items are 

 

Choices(Interviews.Available Dates)
Choices(Interviews.Available Times)

 

 

I'm not using forms or anything, just individual boxes.

 

I added the pictures as an attachment.

Highlighted

Hi @PVosEska ,

 

Thanks, please try this:

Filter(Choices(Interviews. 'Available Times'), !(Value in Filter(Interviews, DateCombobox.Selected.Value in 'Available Dates'.Value).'Available Times'.Value))

 Best regards,

Sik

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (5,993)