Newbies FM_DM Posted November 6, 2014 Newbies Posted November 6, 2014 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.
Fitch Posted November 6, 2014 Posted November 6, 2014 Are you able to make the Find work when you do it manually?
Newbies FM_DM Posted November 7, 2014 Author Newbies Posted November 7, 2014 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.
Lee Smith Posted November 7, 2014 Posted November 7, 2014 The Search Function is not the same as the Find Function. Are you using the key combo of control+shift+F? or Control F?
Fitch Posted November 7, 2014 Posted November 7, 2014 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.)
Fitch Posted November 7, 2014 Posted November 7, 2014 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.
comment Posted November 7, 2014 Posted November 7, 2014 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).
Lee Smith Posted November 7, 2014 Posted November 7, 2014 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.
Fitch Posted November 8, 2014 Posted November 8, 2014 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?
Newbies FM_DM Posted November 10, 2014 Author Newbies Posted November 10, 2014 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!
comment Posted November 10, 2014 Posted November 10, 2014 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.
Fitch Posted November 10, 2014 Posted November 10, 2014 Hmmmm, maybe this?: Set Variable[ $item ; yourItemNameField ] Enter Find mode Set field[ Item name ; $item ] Set field[ location ; "office" ] Perform Find
Newbies FM_DM Posted November 11, 2014 Author Newbies Posted November 11, 2014 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.
Recommended Posts
This topic is 4006 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now