November 6, 201411 yr Newbies Hi I am a complete novice at Filemaker. I work for an electrical installer and am creating an inventory system for the office to keep track of parts. I am basing this on a premade example I was given. What I am looking on doing is creating a script to search in multiple fields and return only those records. For example I wish to find all of the handsets of a particular type that are in the office. Since the stock system has a field which indicates where the part is (office, onsite, repairs) is there a find script I can use. I have attempted this myself but it just returns no records found and then doesn't return to an unsorted view of the layout. It would also be great if there was some way I could have a counter of how many of these items I have in stock that automatically updates when I view the record or make a change to the location of one of the items.
November 7, 201411 yr Author Newbies Yes What I want the script to do is basically return all records that have both the same Item name and location as office. I can do it easily using the search function but I eventually want to have a box showing current number in stock that is automatically updated.
November 7, 201411 yr The Search Function is not the same as the Find Function. Are you using the key combo of control+shift+F? or Control F?
November 7, 201411 yr When people say "Search" in this context, I generally assume that we're talking about Find. (There's no "Search" function in FileMaker -- control+shift+F isn't Search, it's Find/Replace.)
November 7, 201411 yr A basic Find script might look something like this: Enter Find mode Set field[ Item name ; "office" ] Set field[ location ; "office" ] Perform Find But I suspect there may be more to this question. It sounds like you're asking about two separate issues. I'd suggest we deal with one thing at a time. Not sure if it's a scripting issue, but as Wim suggested, it's always useful to see the actual script.
November 7, 201411 yr return all records that have both the same Item name and location as office. That's not a clear description. I eventually want to have a box showing current number in stock that is automatically updated. You can use a summary field to count the records in the current found set (count a field that cannot be empty, such as ProductID).
November 7, 201411 yr When people say "Search" in this context, I generally assume that we're talking about Find. Maybe, but we are not positive, so why not get it clarified? (There's no "Search" function in FileMaker -- control+shift+F isn't Search, it's Find/Replace.) What a nice reply.
November 8, 201411 yr Lee, it sounded like you were saying that a Search function exists, whose keyboard shortcut is control-shift-F. Sorry if I misinterpreted that, but it seemed worth clarifying for the benefit of the OP or other future readers. The Search Function is not the same as the Find Function. Are you using the key combo of control+shift+F? or Control F?
November 10, 201411 yr Author Newbies I am sorry if I am being a little unclear. I have a basic inventory system set up with a separate record for each item. The items are named and then there is a drop down which shows the location. I would like to create a script that when a button is pressed searches for all items of the same name in the location 'Office'. I would also like to create a box on the record which shows the current number of items with the same name in stock. I can do this by searching the items myself but ideally it would be automated. Thanks for all your help!
November 10, 201411 yr I can do this by searching the items myself but ideally it would be automated. Since it appears we are unable to follow your description, why don't you explain exactly (step-by-step) how you do this manually.
November 10, 201411 yr Hmmmm, maybe this?: Set Variable[ $item ; yourItemNameField ] Enter Find mode Set field[ Item name ; $item ] Set field[ location ; "office" ] Perform Find
November 11, 201411 yr Author Newbies Hmmmm, maybe this?: Set Variable[ $item ; yourItemNameField ] Enter Find mode Set field[ Item name ; $item ] Set field[ location ; "office" ] Perform Find This worked great for the button to find the ones in stock! Thank you so much. I am a complete novice at this so I am sorry that I am not being clear.
Create an account or sign in to comment