Jump to content
  • 0

Enforce business rule for maximum value allowed on a field


HughD
 Share

Question

We have an app that tracks the amount of work performed monthly on projects where the project managers enter the Percent Done for each active project on a monthly basis. 

There's an integer field (Total Percent Done) on the parent table (Projects) that receives the SUM of values of the (Percent Done) field on the associated child table (Project Work Entries) via insert and update triggers. Javascript has been implemented to alert users via a pop-up if a Work Entry would result in the Total Percent Done being >100. However, users can still actually enter values that would result in Total Percent Done being >100.

We're looking for a way to enforce a business rule on the server side that would not allow Total Percent Done to be >100. Any idea on how this would be best done? 

Thanks in advance!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @HughD,

I would recommend taking a look at Triggered action feature.

 

You can set up a Trigger which will delete the record if it doesn`t meet the requirements and also you can set up an Email Trigger to inform the user that his record was rejected. You can find more details in this article and there is a video available too:

https://howto.caspio.com/tables-and-views/triggered-actions/

 

Hope this helps.

Regards,

vitalikssssss

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...