November 25, 200421 yr Newbies I have eight fields named: REGO1, REGO2.....REGO8 All of these are on my Customer Information form. They are customers car registrations. I need a way of entering a car registration once and it searching all eight fields. Is there a better way to do this? How do I do this? As well as REGO1 - 8 there is also the colour and model for each car as a seperate field I.E. REGO1 REGOCOLOUR1 REGOMODEL1 fields for one car. How do I set up a script to search all of these fileds by entering the rego somewere just once to find it. Jason [email protected] [color:"blue"]
November 25, 200421 yr Another way of doing it (in FMP 7 ) is to use a repetition field with a global $fieldsToSearch (text with 10 repetitions) stored as global #SearchData (text calculation with 10 repetitions) = getRepetition(getfield($fieldsToSearch),1) // get the first rep (ie unExtend) of the fields listed in repetitions of the $fieldsToSearchGlobal So when $fieldsToSearch is [Name|Age|Address|Phone] #searchData may be [bob|23|123 Cherry Lane|555-1234] for one record and [Ann|42|45 Hickory Drive|555-6789] for another record When you search on a repetition field, it will search across all repetitions The nice thing about this method is that you can change the fields to search on the fly. Scott
December 4, 200421 yr Newbies This is a script I gludged together: Go to Layout ["Find"] Enter Find Mode [Pause] Copy [select; ABC Database::FindWordfield] New Record/Request Paste [ABC Database::field1] New Record/Request Paste [ABC Database::field2] New Record/Request Paste [ABC Database::field3] New Record/Request Paste [ABC Database::field4] Perform Find [] Go to Layout ["Index"] NOTE: The "Find" layout is a screen devoted to Finding a word or phrase. The "FindWordfield" is the field containing the word or phrase to be looked for. The Layout "Index" lists all the found records in a column by "Record Name" (field1). On the Layout "Index" place a button along side the field to go to that record. On the record place a button "Return to Index". The above works though it's a bit crude. I like the "Sandwich" suggestion above which I implemented in another "Global Search" Layout. It works great too! Also apply the necessary navigation buttons.
Create an account or sign in to comment