web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / create collection filt...
Power Apps
Answered

create collection filtered on created date -31 days

(0) ShareShare
ReportReport
Posted on by 603

Hi all,

 

A short question, I've in my onvisible settings a clear collect where I'm collection all the records that are not older then 31 days.

To achieve that I've build the follow code:

 

ClearCollect(
 Col_Myhours,
 Filter(
 registration,
 User = Var_User, Created >= DateAdd(
 Today(),
 -31,
 Days
 )
 )
)

It works fine, my collection is filled. But it's give me the error: "Date add function cannot be blank".

 

I didn't know what/ where the issue is.. Does anyone know what's wrong?

 

Regards,

Dennis

Categories:
I have the same question (0)
  • Verified answer
    C-Papa Profile Picture
    1,836 on at

    Try setting the date add value in a variable and using the variable in the formula

  • Verified answer
    dennisb88 Profile Picture
    603 on at

    Hi @C-Papa , thank you for your reply.

     

    You're suggestion was the right one! Thanks!

     

    The correct formula:

    Set(
     var_date,
     DateAdd(
     Today(),
     -31,
     Days
     )
    );
    ClearCollect(
     Col_Myhours,
     Filter(
     registration,
     User = Var_User,
     Gemaakt >= var_date
     )
    )

     

  • pbaxter Profile Picture
    8 on at

    @dennisb88 super helpful thanks for the solution!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard