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 / Validate that a record...
Power Apps
Answered

Validate that a record is not created in a Dataverse table after 5 in the afternoon?

(1) ShareShare
ReportReport
Posted on by 8
Hello, a query, how can I validate that a record is not created in a Dataverse table after 5 in the afternoon?

 

I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,960 Moderator on at

    Hi @MarcoErlwein 

     

    You would need to do the following

     

    1. Create a Flow (I dont know how often you want it to run of its one time so I say for now create an Instant one for testing purposes

     

    2. Add a List Rows (dataverse action)

    -Select the Table

    -Click Advanced

    -In the Filter you would do want to compare the Created Column with the Current Day 5:00:00 PM time so you need to generate a DateTime value

     

    so you end up with 

    Created ge 'The DateTime value you created'

    ge means greater than or equal to

     

    right after the list rows you would add a Condition

    In the left side of the Condition, put length('Insert the dynamic value property from the List Rows Action')

    in the middle choose is greater than

    in the right put 0

     

    In the Yes part of the Condition, this would tell you that you had more than 0 rows created after 5PM today

    on the No side, it would mean you had zero

     

    That's who you would do it.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Verified answer
    ivan_apps Profile Picture
    2,189 Moderator on at

    Simple answer: every record in dataverse has a 'created on' column.  This will tell you when it's created in datetime format.  You can create a view to determine today's creation after your selected time or any other day. Power BI can also help you do this in mass if you want to explore that.

     

    More in-depth: are you trying to prevent creation after 5:00pm? or just checking if this is the case? If you are preventing creation, there are several way to do it, but you'd likely want to set up a time frame when it's blocked from creation and when it's available for creation again.  Further you'd probably want to take into account different time zones. Are you saying 5:00pm local time for the user or 5:00pm on a specific time zone? All these dates are stored in UTC time in the database and get converted to local time when you see it, so be clear with the specification. 

     

    If you want to block creation - Plugins are the most complete method to do it.  Normally written in C#, but low-code plugins via the Dataverse accelerator may be possible. They will block the dataverse transaction to create the record no matter which method the use tries to execute it.

    JavaScript can be used as well to block creation from a form-centric way.  As long as users are using the form, they can be prompted that they cannot create after current datetime > 5:00pm.  There are several ways to create records outside of forms so be aware this isn't a complete solution. 

    Power Automate can also clean up records after they are created if after 5:00pm - however it's a bad experience since the user isn't warned about this. 

    Lastly you could also un-share your app to prevent creation after 5pm if that fits. Power Automate can automatically share and unshare apps to groups or individuals on a schedule if you want a downtime after 5pm.

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard