April 11, 20169 yr Hi there, New to FM and would like some help with a search, its for company chairman who refuses to learn how to use the new request feature! I'd like him to be entered into the find mode where he can select the field he wants to search, when he presses enter I need the script to then also search another field, which if it has any values omits those records, finally showing the end results. Many thanks Tony
April 12, 20169 yr Enter Find Mode Type in the criteria in field one New Record Request (key combo or Menu Request “New Record Request”) Go to field two and type in Omit criteria Perform Find HTH Lee
April 12, 20169 yr Author Thanks for the reply Lee, Client will only enter the first field and has no clue about omitting records, since the omit is constant the script could do this after client has made their chose from the first field. At the moment I have: Go to layout Enter find mode [paused] 'this enables client to enter their search criteria' New record/request Enter find mode [restore] 'I have put the omit criteria here' Perform find [] All I get is the last bit of the search, the first part entered by client is ignored
April 12, 20169 yr Your restored Find request has a search for name="John" in it, so of course it will override any user input and just show unarchived John records. (Double click the step in the Script Workspace to see what is stored in the find step) That is why I always use the explicit form of the find command: Enter Find Mode[]//NO RESTORE!! Set Field [Search::archived; "yes"] Omit Record[] Constrain Found Set That way, the find criteria are right in front of me. Use of Perform Find in this step will ignore the previous user found set also, so use Constrain Found Set Edited April 12, 20169 yr by doughemi
April 12, 20169 yr Author How do you get the line [search::archived; "yes'] next to the Set field? Still wont work search.fmp12
April 14, 20169 yr Author Based on the attached script, how could I expand this search out to user being able to search multiple fields and then the final 'archive omit', would it just be a case of deciding how many find requests are done before the script does the final constrain found set? searchmultiple.fmp12
April 14, 20169 yr If they're searching multiple fields at the same time, they would just put information in each of the desired boxes - e.g., Charles and 44, then continue the search
Create an account or sign in to comment