April 17, 200223 yr 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
April 17, 200223 yr 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
April 17, 200223 yr 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
April 18, 200223 yr 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.
April 18, 200223 yr 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
April 18, 200223 yr 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
April 18, 200223 yr 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 ]
April 24, 200223 yr 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.
Create an account or sign in to comment