Forum Discussion

AshleighWansbro's avatar
AshleighWansbro
Qrew Member
5 years ago

Setting range limits on numeric field entries

Hello everyone, 

I am new to quickbase app development. I have a data entry form for users to fill out that contains numeric fields for Days Hours and Weeks. I would like a way to limit the entry for those fields. I.E the maximum entry for the hours field would be 23, maximum number for days field would be 6. 

Is there a way using a traditional numeric entry field or a formula to prevent a user from entering a number that falls outside of a desired range? 

#numeric field

------------------------------
Ashleigh Wansbrough
------------------------------​​
  • The easiest solution is to go to the Advanced Properties for the table and enable the checkbox for data validation which they call Custom data Rules.

    Build custom data rules for this table:
    Learn more about using custom data rules here
    Turn custom data rules on?   

    So the idea is to make a formula which calculates an error message and if the formula calculates to null, then the record will save else it will abort and throw up the error message. 

    for Example

    List("\n",
    IF([Hours >23, "Sorry, Hours too high")
    IF([Days >6, "Sorry, Days too high")

    This will block the save at the raw database level so regardless of how the data is input, forms, grid edit, API, Imports .. the rule will apply.




    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------