Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7293 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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"] cool.gifcool.gifcool.gifcool.gifcool.gifcool.gifcool.gifcool.gifcool.gifcool.gif

Posted

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

  • 2 weeks later...
  • Newbies
Posted

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.

This topic is 7293 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.