Skip to main content
Question

[Snippet] How we Stop Backdating Entries from user


Forum|alt.badge.img+11

Starting a new series on sharing some knowledge.

We have a simple app where we ask users to do production entries from shop floor daily in date , capturing it in [Production Date]

We only wanted backdated entries for 1 day , so if today is 21 February 2025, entry for 20 Feb 2025 is allowed. 

Here's how we achieved it. Below is a Formula Field called Validations. 

var date decide = If(IsNull([Record ID#]),Today(),ToDate([Date Created]));
var number daydiff= ($decide-[Production Date])/Days(1);

If($daydiff<0,"You cannot do entry for future",
$daydiff>1,"You cannot do entry for past","OK")

We then went to Settings->Advance Settings-> Custom Rules - Turn ON

If(
[Validation]<>"OK",[Validation]
)

bensimon
Forum|alt.badge.img+14
  • Quickbase Alumni
  • February 21, 2025

This is great stuff, PrashantMaheshw ! How's it been working out so far? And would you have any interest in bringing your Showcase Series to Qrew Meet Ups? 


Maria
Forum|alt.badge.img+19
  • Community Manager
  • February 21, 2025

Simply elegant. Thanks for sharing PrashantMaheshw