Rich S Posted May 14, 2009 Share Posted May 14, 2009 This one's a little tricky and I'm sure there's an elegant, simple solution that I'm overlooking. I want to limit the number of records a user can create in a runtime demo file to say, five records. I also want to leave the Status Area available since it'd save time/coding for such a simple project. So far, I have a Summary field ("record_count") that will count the number of records in the Master table. What I figure is that a calculation can be created using that field: if its count exceeds five records then the user is flashed a Custom Dialog message saying that he or she has reached the five-record limit and cannot create any more records. ...and therein lies the problem: With the Status Area available, all a user has to do is click the New Record button and a new record is created. So, is there a way to prevent the user from creating that sixth record or am I really stuck with hiding the Status Area and scripting a button? TIA for your help, Rich Link to comment Share on other sites More sharing options...
David Jondreau Posted May 14, 2009 Share Posted May 14, 2009 How about putting Get(TotalRecordCount) < 6 in the Privileges definitions? Link to comment Share on other sites More sharing options...
Rich S Posted May 15, 2009 Author Share Posted May 15, 2009 Of course I never thought of that; I'll have to check that out. Thanks! Link to comment Share on other sites More sharing options...
Rich S Posted May 16, 2009 Author Share Posted May 16, 2009 Rats! In Custom Records Privileges you can insert a formula for editing records using "Custom...", but not creating them (per table): you can only choose Yes or No. Yet another suggestion for the FileMaker Wish List. :S *heavy sigh* Well, I guess it's Button City time. Link to comment Share on other sites More sharing options...
bcooney Posted May 16, 2009 Share Posted May 16, 2009 If you use custom menu sets, then the New Record script tied to the New Record command and button in the status area will use your New Record script which is limiting to a record count. I would point out that the more records they create, the more they want to purchase the full version. How about another limit? Export, print? Link to comment Share on other sites More sharing options...
David Jondreau Posted May 17, 2009 Share Posted May 17, 2009 If you're trying to really lock down a solution, Access Privileges is the way to go. Why not simply use the formula in the Edit box? What good is a New Record if you can't edit it? Link to comment Share on other sites More sharing options...
bcooney Posted May 17, 2009 Share Posted May 17, 2009 Try searching in the Advanced and Developer Features subforum for "demo" using any date. Lots of threads debating approaches. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5472 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