maraneda Posted March 6, 2003 Posted March 6, 2003 I have a database with a field country. It is a popup menu field with this option: USA, Chile, France, Other I need to make a script that find all record's than match country=USA or country=Chile at once. How can I do it ??
RussBaker Posted March 6, 2003 Posted March 6, 2003 Enter the Find Mode, select USA in the country field, select a new request (CTRL N or Apple N), select Chile in the country field. Now execute the find. You should now see all records from Chile and the USA. Now, create a new script (Find Chile and USA) and edit it until it contains only the Perform Find[Restore] step. Thats it. Your new script will only find USA and Chile records.
maraneda Posted March 6, 2003 Author Posted March 6, 2003 Thanks a lot, but I have to doit for any combination of data, for that reason I'm thinking to doit with 2 auxiliary field's, let say country1 and country2. This way the user can suplies this to field a the script must find all the record wheare the "country=country1 or country=country2". This is good for me, but how can I doit with a script : (sorry about my language I'm a spanich spoken)
Ugo DI LUCA Posted March 6, 2003 Posted March 6, 2003 In that case, II would use a self-relationship using a global field g_country. This global could be set in the layout. Your script therefore could be a one line script : Go to related records (SelfjoinonCountry).
maraneda Posted March 6, 2003 Author Posted March 6, 2003 ok, works good when I'm looking for one country but how you doit with two coutry's? Let say Chile or USA
Ugo DI LUCA Posted March 6, 2003 Posted March 6, 2003 Put a single carriage return into the field. This makes 2 indexed value to be searched. Chile USA If you have to do it by script, Chile & "PP" & USA where PP stands for Carriage return. Also called Multikey match...
maraneda Posted March 6, 2003 Author Posted March 6, 2003 What I dit is: I have a filed country and a field g_country. I made the self relation country->g-country If I put USA at g-country field and I run the script all the USA records apear, because I have only one country to find. But I have to find for 2 countries, how can I tell to filemaker to show me record's weare "country=USA" and "country=Chile" : g-country accept only one of them at the same time.
Ugo DI LUCA Posted March 6, 2003 Posted March 6, 2003 Set relationship g_country::country. Enter USA + carriage return CHILE Then script your Go to related records. It sure works.
maraneda Posted March 6, 2003 Author Posted March 6, 2003 Thank's a a lot, it work's great. What I finaly did was: I have a field country, a field a_country, a field b_country and a calculation field g_country g_country=a_country & "
RussBaker Posted March 6, 2003 Posted March 6, 2003 OK. I've had a read of this and I have attached a file which contains a sample of 2 ways to do this. One is a Scripted Find, and the other is a Relationship Method. Country Tester v2.fp5.zip
Vaughan Posted March 6, 2003 Posted March 6, 2003 Russ, don't they give you enough work to do in the ADF?
RussBaker Posted March 6, 2003 Posted March 6, 2003 Vaughan, Well there is this rumor that there is something else going on militarily in the world right now but the "relationship" method tweaked the interest gene, as I hadn't used it like that before.
maraneda Posted March 8, 2003 Author Posted March 8, 2003 I have the zip file but the FileMaker File is pasword protected. It is Working good but I can't see how you dit it
Recommended Posts
This topic is 7935 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