Hi All,
I have 2 dropdown called DrMonth and DrYear and Items for both each dropdown as shown below
DrMonth
Items = Sequence(12,1,1)
DrYear
Items = Sequence(12,Year(Now()) - 0,1)
Now, I have Sharepoint list column called 'Induction Date' and type is Date & Time.
I have filter my gallery with below code which is working as I expected and I can retrieved the records based on Month or Year I have selected.
but now, I need to achieved default both dropdown are blank and on Gallery will retrieved all records from SharePoint list.
Code
Sort(
Filter(
'IT Induction SEA',
'Induction Date' >= Date(
DrYear.Selected.Value,
DrMonth.Selected.Value,
1
) And 'Induction Date' < DateAdd(
Date(
DrYear.Selected.Value,
DrMonth.Selected.Value,
1
),
1,
Months
)
),
'Induction Date',
Descending
)
Thanks
Hi @Ethan_R ,
Thank you for your respond.
Have tried your code, however the default drmonth is 1 and dryear is 2023 due i put items Sequence(12,1,1) on drmonth and Sequence(12,Year(Now()) - 0,1) for dryear. when the screen gallery showing all records from month 1 and 2023 year retrieved, what I need to modify on item drmonth and dryear to get blank value?
Thanks
What items i need to be add on drmonth and dryear?
Hi @Am4ree ,
Try the following code,
Sort(
Filter(
'IT Induction SEA',
( IsBlank(DrYear.Selected) || IsEmpty(DrYear.SelectedItems) || 'Induction Date' >= Date(
DrYear.Selected.Value,
DrMonth.Selected.Value,
1
)) And
( IsBlank(DrYear.Selected) || IsEmpty(DrYear.SelectedItems) || 'Induction Date' < DateAdd(
Date(
DrYear.Selected.Value,
DrMonth.Selected.Value,
1
),
1,
Months
))
),
'Induction Date',
Descending
)
Hope this helps