WGulliver Posted April 23, 2009 Posted April 23, 2009 I am having difficulty writing what I thought was a simple find script. I am using a single database to keep track of our widgets. We have two different types of widgets, incoming widgets and outgoing widgets and all of the widgets have a unique name. I have assigned one field (NAME) to contain the unique names of the widgets and one field (WHOM) to contain to whom the widget was sent (if it is incoming I enter "us" in that field if it is outgoing I enter "Joe" or "Acme Corp." or "The Andersons" etc). I would like to create a script that performs a find in the NAME field that first filters out all of the "us" widgets from the WHOM field. I would also like to create a script that performs a find in the NAME field that first filters out everything EXCEPT for the "us" widgets from the WHOM field. Please keep in mind if/when you respond I don't know the FIRST thing about writing a FM script. I clicked away in the script manager and tried many variations. I've read a good bit of The Missing Manual but I still have almost no idea what most of any of it means.
mr_vodka Posted April 23, 2009 Posted April 23, 2009 To take a current found set of names and then you want to constrain it by a script in which the Whom field is "us": Enter Find Mode Set Field [ Whom; "us" ] Constrain Found Set To take a current found set of names and then you want to constrain it by a script in which the Whom field is NOT "us": Enter Find Mode Set Field [ Whom; "us" ] Omit Record Constrain Found Set
WGulliver Posted April 23, 2009 Author Posted April 23, 2009 Oh this is fantastic!! Thank you VERY much! Perfect!
WGulliver Posted April 30, 2009 Author Posted April 30, 2009 Whoops! I spoke too soon. The first script in which the Whom field is "us" I get one of two results. If I remove the pause in the Enter Find Mode step then I cannot enter the Name of the widget and the script found set is every single widget sent to "us". If I remove the pause in the Enter Find Mode step it allows me to enter the name of the widget but I will get a warning saying "no records match this set" even though there are records that match that set.
mr_vodka Posted April 30, 2009 Posted April 30, 2009 Based on your first post, I thought that you would be manually searching for a widget, returning a found set, and then hitting a button to constrain the set to only those in the US or not in the US.
WGulliver Posted April 30, 2009 Author Posted April 30, 2009 Sorry I should have explained myself better. I would like to write a script so that when I click a button a situation is created where I can input the name of the widget to be found and the script will automatically cull it's finding(s) from the US set. The other button would omit findings from the US set. I hope that's clearer. Thank you for your patience and help with this.
mr_vodka Posted April 30, 2009 Posted April 30, 2009 Let say you have the following records. ID Name Whom 1 John us 2 Bob us 3 Mary them 4 Kelly us 5 Rob us 6 John other 7 John us 8 Cindy them 9 John them First one: Enter Find Mode [Pause] // Enter manual criteria "John" Set Field [ Whom; "us" ] Perform Find [] Will return 1 John us 7 John us Second One: Enter Find Mode [Pause] // Enter manual criteria "John" New Record/Request Set Field [ Whom; "us" ] Omit Record Perform Find [] Will return 6 John other 9 John them
michael3785 Posted August 10, 2009 Posted August 10, 2009 Thanks for your post mr_vodka. I have been wondering how to do omit case for ages. I am no newb but didn't put together the idea of running the omit step before the find step. I was always thinking it would be a check box on the find step and that this was some fm blind spot or something! Thanks again. Michael
Recommended Posts
This topic is 5586 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