Building an App for users to sign up for training courses. Right now I have my "Browse Gallery" being filtered by Check boxes and a search box.
SortByColumns(
If(
CheckboxAdmin.Value,Filter('Test: classes',Category.Value="Administrative"),
CheckboxConstruct.Value, Filter('Test: classes',Category.Value="Construction") ,
CheckboxGen.Value, Filter('Test: classes',Category.Value="General"),
CheckboxSafe.Value, Filter('Test: classes',Category.Value="Safety"),
Search('Test: classes', TextSearchBox1.Text, "Title")),"Date")
This is my current filter that works just fine. I want to add the Calender filtering option.
I have a calendar from a gallery:
Right now my Sharepoint list has the StartDate and EndDate formatted as text.
How would I write the formula to filter the dates, the checkboxes, and the search textbox? Is there another way to filter a gallery?
Thanks Sik!
I did have to tweak your solution to fit my properties but there is a small issue maybe you can help me with. Here is my current formula.
SortByColumns(
If(
CheckboxAdmin.Value,Filter('Test:CourseCatalog',Category.Value="Administrative" && _selectionStart<=StartDate && _selectionEnd>=EndDate),
CheckboxConstruct.Value, Filter('Test:CourseCatalog',Category.Value="Construction" && _selectionStart<=StartDate && _selectionEnd>=EndDate) ,
CheckboxGen.Value, Filter('Test:CourseCatalog',Category.Value="General" && _selectionStart<=StartDate && _selectionEnd>=EndDate),
CheckboxSafe.Value, Filter('Test:CourseCatalog',Category.Value="Safety" && _selectionStart<=StartDate && _selectionEnd>=EndDate),
Search(Filter('Test:CourseCatalog',_selectionStart<=StartDate && _selectionEnd>=EndDate), TextSearchBox1.Text, "Title")),"Date")
The issue is, now when there are no dates selected, no classes show up.
It should be when no dates are selected (or any other filter) ALL the classes are shown.
Can you help?
@Anonymous
Is the calendar a component? What is the output property?
I assume the properties are StartDateProperty and EndDateProperty.
Please try this:
SortByColumns(
If(
CheckboxAdmin.Value,Filter('Test: classes',Category.Value="Administrative" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)),
CheckboxConstruct.Value, Filter('Test: classes',Category.Value="Construction" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)) ,
CheckboxGen.Value, Filter('Test: classes',Category.Value="General" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)),
CheckboxSafe.Value, Filter('Test: classes',Category.Value="Safety" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)),
Search(Filter('Test: classes',Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)), TextSearchBox1.Text, "Title")),"Date")
Sik