AnsweredAssumed Answered

Need Help with a script.

Question asked by tcoyle on Jul 29, 2009
Latest reply on Jul 30, 2009 by tcoyle


Need Help with a script.


Ok here is my problem. I created a database for Booking Recording Studio sessions. I have a script that checks the Projects for double bookings. It checks the studios and  a field for date range. My problem is this. My studio names are A,B,C,AL,BL, and CL. Here in lies the problem when the script runs it keeps showing double bookings if there is a booking in Studio A and AL, or for that matter any Studio that starts with the same letter as another studio like B and BL, C and CL. When I go to my projects page and do a find just for bookings for a particular studio using the "" search. It indeed pulls any record with the searched data, ie "A". If I do a search using the =="" search, it then pulls ONLY the studio I am looking for. 


Here is my script





My question is this in the set field script is there a way for filemaker to look at the whole field or is it always going to just search by the first Letter? or is there a better way of doing the same thing another way? I know I could just change the rooms to be completely unique, but not quite what my client is looking for. It seems that if I can manually do the search correctly using the =="" search, some how I should be able to accomplish this within my script.