February 7, 200719 yr I want to find club members who haven’t paid their 2007 membership renewals. My primary table contains records of members and non-members alike. For the members, I have a related "History" table with membership history. Manually, the find is preformed by first finding records that contain “2006” then omitting those records that contain “2007”. That produces the desired result. In the Scriptmaker find criteria, I’ve done the same thing. I’ve specified; find “2006” then omit “2007” as two criteria. How do I make the criteria dynamic? Next year the criteria will be find “2007” and omit “2008”. A get “year (current date)” and get “year (get current year -1) will produce the criteria. But I don’t know how to place a calculation or a calculated result in the “Find Criteria” script box.
February 10, 200719 yr I don't bother with the "find criteria" box in scripts: I just set the criteria as if I were doing it manually. So, your script might be: enter find mode set field ['history'] to "year(get(currentdate))-1" new record/request set field ['history'] to "year(get(currentdate))" omit record/request perform find []
February 10, 200719 yr Author Thanks James!! It worked like a charm. I forgot that "new record/request" and "omit record/request" script steps do double duty. Dudley
April 20, 200718 yr I am trying to do something similar to this, but have not been able to find the solution. In my script, I want to perform a find where the criteria is the contents of a global field. I cannot use the suggestion in this thread because the field that I am searching (the ID field) is not visible on the layout that I'm using. So, how can I perform a scripted find where the criteria is simply the contents of a (numeric) global field? Thanks in advance
April 20, 200718 yr Hi PTKen, I cannot use the suggestion in this thread because the field that I am searching (the ID field) is not visible on the layout that I'm using. The Set Field[] Script step works in exactly the same way if the field is on the layout or not... So the script: Enter Find Mode[] Set Field [ Table::ID ; Globals::ID ] Perform Find[] Will work... If you tried insert calculated result on the other hand, well that is dependant on the field being on the layout. Point is, if you use set field it should work fine ;)
April 20, 200718 yr Enter Find Mode[] Set Field [ Table::ID ; Globals::ID ] Perform Find[] Thank you. This worked perfectly. I had actually tried it this way, but I made a mistake. Instead of the Perfor Find[] step, I thought I needed to use a New Record/Request step, which was of course wrong. Thanks for your help!
Create an account or sign in to comment