2 Replies Latest reply on Mar 15, 2013 1:52 AM by xtremu

    How to limit student to borrowed 2 books per day



      How to limit student to borrowed 2 books per day


           Hi guys,

           Need help here.


           I am currently developing our Library System and I am using Filemaker Pro 11 Advanced. My problem is how to limit student/s to borrowed 2 books per day.

           The system will monitor student transactions with in that day on how many books they borrowed. If the system monitor that they borrowed 2 books already, the system will not permit them to borrow another book (3rd book). Student should return first the first book or both books before the system will allow then to borrow again another 2 books. This would happen if they click the check out button (if possible that we can have the script for that).

           I'm using the Lending Library relationships from the starter solution of FM. Changed Asset and Contact into Student and Book. What are the fields do I need to add, its properties and what is the script for this. Where did I put the script, in Asset Process Check out or in Contact Process Check Out or in History Process Check Out?

           Hope you can help me solve this problem. Thanks and more power FM


        • 1. Re: How to limit student to borrowed 2 books per day

               You are asking for a lot all in one post. Every time I've looked at this one, I've passed as I didn't have the time to open up the starter solution in order to post an answer in terms of the fields, tables and relationships present in that file.

               The basic concept is to use the relationship from Student to History to count the number of related records for books that have not yet been logged as returned. If the count is greater than 1, the student cannot check out another book.

               Just from a quick glance at manage | database | relationships, it would appear that you can use

               Count ( History Contact ID Flag Checked Out::Contact ID Flag Checked Out )

               to count the number of books currently checked out for a given Contact.

          • 2. Re: How to limit student to borrowed 2 books per day

                 Hi Phil, Im sorry for this type of post, I did a lot of search related to that problem but unfortunately I can't have the solution. I made those questions because I know that guys here in FM know that already. But you know Phil, your suggestions above saved me and solved my problem even if it’s hard for me to figure out where to put that script in between the multiple script.

                 Change Delete Record/Request into Revert Record/Request under History Cancel Process Check Out to not delete the student record when you cancel the process.

                 Thanks so much..