drdigital9 Posted April 17, 2002 Posted April 17, 2002 This seems like it should be an easy thing to do, but I have been searching and have come up empty. How can I limit a database to accept 50 records and then stop. In effect the database is full at that point? An explanation, or some keywords to search this forum would be very helpful. I have tried: Full, Limit, Restrict
Garry Claridge Posted April 17, 2002 Posted April 17, 2002 There is no built-in limiter (that I know of). You would have to do it with CDML and/or Scripts. All the best. Garry
Steven H. Blackwell Posted April 17, 2002 Posted April 17, 2002 Have new records created by script. Run a test in script to check for count of records. If it is in excess of what you want, exit the script. THis is not perfect, but ti will work. Old Advance Man
Keith M. Davie Posted April 18, 2002 Posted April 18, 2002 Gee it's really good to see someone recommend using a script in a browser solution. Just make sure that there are no near-simultaneous requests, or if there are, make sure that the users are properly advised if a script does not run. And don't use a loop.
Jeff Spall Posted April 18, 2002 Posted April 18, 2002 Hi, I avoid scripts in web databases ('cos I've never got them to work!) and try to substitute calculations. Would this work for you: Have a serial number and use an FMP-IF in the new record page which delivers different html if the serial >50 It could either return 'sorry, maximum number of submissions received' instead of the form or just change the form action to another database if you wanted to continue to capture the info somewhere else. This won't stop the database from accepting records over 50, but users won't be able to submit from a web page. regards, Jeff
Jeff Spall Posted April 18, 2002 Posted April 18, 2002 Hi, I avoid scripts in web databases ('cos I've never got them to work!) and try to substitute calculations. Would this work for you: Have a serial number and use an FMP-IF in the new record page which delivers different html if the serial >50 It could either return 'sorry, maximum number of submissions received' instead of the form or just change the form action to another database if you wanted to continue to capture the info somewhere else. This won't stop the database from accepting records over 50, but users won't be able to submit from a web page. regards, Jeff
Garry Claridge Posted April 18, 2002 Posted April 18, 2002 I believe the CDML solution would be the most appropriate for this. Garry
Keith M. Davie Posted April 18, 2002 Posted April 18, 2002 Jeff, I offer a script solution for sale at my website so you don't need to reinvent the wheel. Regarding Jeff's suggestion of the If conditional, a serial no is not necessary. Try: [fmp-if: currentrecordcount .lte. 50] show proceed text [fmp-else] no way to proceed. Jeff's caveat is still valid with this. [ April 18, 2002, 04:54 PM: Message edited by: Keith M. Davie ]
Vaughan Posted April 24, 2002 Posted April 24, 2002 An earlier post might suggest a sctiptless solution: validate a field, with the validation as "Status(CurrentRecordCount) <= 50 When somebody tries to add a new record, the validation will fail, the record will not be created (strictly speaking I bvelieve it is created then immediately deleted) and the error page will be returned. TRap for the validatio failure on thr error page. Test the validation first to see if it'll work. If it does it'll be *really* neat.
Recommended Posts
This topic is 8241 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now