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

Expense Report Date filter problem

 

Hi All, 
I've created A expenses report. It works Good. When I create a new report if I use the same day for "PERIOD - START DATE" and "PERIOD - END DATE"  everything is fine . But If I put different dates to date fields All reports are deleted. And apply button  is not working at edit mode

 

sinanaalmac111_1-1660295261970.png

 

sinanaalmac111_2-1660296044335.png

Filter Apply button  kode

Set(ExpenseStartDate, FilterDateStartDate.SelectedDate); Set(ExpenseEndDate, FilterDateEndDate.SelectedDate); Back()

 

Expenses gallery items  code 

 

Sort(Filter(Expenses, And(StartDate>=ExpenseStartDate, EndDate<=ExpenseEndDate, Or(ExpenseStatus="All", Status.Value = ExpenseStatus))),DateSubmitted,ExpenseSorting)

App object on start  code 

Set(ExpenseStartDate, DateAdd(Now(),-7,Months));
Set(ExpenseEndDate, DateAdd(Now(), 14, Days));

I'm using sharepoint list as data source 

Help me Please to  solve  this problem 

 

Regards
Sinan

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Roverandom


It tried  this  one 

 

Set(ExpenseStartDate, DateAdd(Now(),-7,Months));
Set(ExpenseEndDate,DateAdd(Now(),10,Months))

I  tried the above one. And it's working right now. I just gave a started and end period point manually in it  
I don't know how. but right now it's really working. 

View solution in original post

2 REPLIES 2
Roverandom
Solution Supplier
Solution Supplier

It seems to me that the problem is this: Set(ExpenseStartDate, DateAdd(Now(),-7,Months));
Then, in Button.OnSelect you define it again as a date, not just as a month.



Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

Hi @Roverandom


It tried  this  one 

 

Set(ExpenseStartDate, DateAdd(Now(),-7,Months));
Set(ExpenseEndDate,DateAdd(Now(),10,Months))

I  tried the above one. And it's working right now. I just gave a started and end period point manually in it  
I don't know how. but right now it's really working. 

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,385)