I have tables called Clients and Admissions. One to many -- each Client can have multiple Admissions. The Admissions table has a status for every record (pending, open, or closed) but they are allowed to have only have one (1) unclosed (so 1 Pending OR 1 Open) admission at any given time.
It would be easy peasy in a straight-up SQL stored procedure -- just query the count of open and pending records before insert and if either one already exists return a message saying as much and don't insert the new record.
How do I the equivalent of that in the CASPIO world?
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.
Question
Becca37
I have tables called Clients and Admissions. One to many -- each Client can have multiple Admissions. The Admissions table has a status for every record (pending, open, or closed) but they are allowed to have only have one (1) unclosed (so 1 Pending OR 1 Open) admission at any given time.
It would be easy peasy in a straight-up SQL stored procedure -- just query the count of open and pending records before insert and if either one already exists return a message saying as much and don't insert the new record.
How do I the equivalent of that in the CASPIO world?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
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.