August 25, 200619 yr I would restrict creation of new records so that it can only be done by script. You also need to set up a table where you can store the date of last creation and a field where you can count the number of records created since the date changed In your record creation script you first need to check if the date has changed since you last created a record (If(Get(CurrentDate)>< your date field). If the date has changed, set the count field to 1, create your record and store the current date to the 'date last created' field. If the date hasn't changed check if counter is 10. If it is give them a message to that effect and exit the script. If the counter is less than 10 create the record and increase the 'count' field by 1 That's how I would tackle it HTH Phil
August 25, 200619 yr Author Newbies thank you phill :/ i had try to check date change in wrong method i think if get(currntdate) = my date field perform script2 setnextserialvalue(counter [0]) end if script2 if(my counter field) < 9 new record request exit script end if thank you very much but where can i learn this kind of tips like if the date has changed since last recors with using " >< " i need a book or something etc. which gives examples of all functions..
August 25, 200619 yr Hi Frat I have never used a book as such. I found the problems with books is that they never seem to quite cover the problem that you have - or if they do you can never find it ! I used the tutorials that came on the original disk to get the basics and then I discovered the forums where I received an enormous amount of help for which I am eternally grateful. Keep working away, use the help files that are available through your Filemaker application and then when you get stuck post your queries in here. There is no such thing as a stupid question and the people in here are the most sharing people I have ever come across. Other than that, all I would suggest is that you ask for help with solving your problem rather than expecting someone to solve it for you. That way you will get a lot more replies to your posts Good Luck and see you around Phil
August 25, 200619 yr Hi Frat & Phil, Filemaker has a pdf file that lists all functions and the parameters available. Check out the following link. http://www.filemaker.com/downloads/pdf/fmp85_functions_ref.pdf There is also a companion pdf for script steps. HTH Tim
August 25, 200619 yr Another way to check would be to create a self-relationship on a DateCreated field, then count it during your script: Count ( self-relationship::DateCreated ) You could even put the same into a primary field's validation.
Create an account or sign in to comment