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

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

Recommended Posts

Posted

I have 2 fields (State,Tag). Manually I enter Find mode, enter CA in State and =NP in Tag and I get a found set with all records with CA in State and NP in Tag. Good. Then I enter find mode, enter CA in State and PS in Tag, then click Extend Found Set under the Request tab. This adds records to the Found set that have CA in State and PS in Tag. Perfect.. that's what I want. BUT I can't make it work in a Script.

(I know that as written below this should extend the found set to include ALL records with ps in the Tag field, so somewhere in the script I'm going to have to figure out how to pull the State field from the original FOUND SET and plug it into the parameters of the EXTEND function, but at this point I can't get the EXTEND part to work correctly.)

What I want to happen is:

click BUTTON

find mode pops up with =np in Tag field

user enters value (e.g. CA) into State field

user hits Return

Filemaker finds and displays records with CA in State and np OR ps in Tag.

Here's what I've tried (well.. one of the things I've tried):

Select window

Enter find mode [Restore] (specified Tag: [=np])

Enter find mode [Restore] (specifed Tag: [=ps])

Extend found set []

Thank you very much for any help!

Posted

Do you really need to Extend the set or just find for PS or NP in tag and CA in State?

Manual:

- Enter Find Mode

- Type CA in State Field NP in Tag field.

- Crtl-N (or Mac Equiv) or Record>New Record (New Record/Request)

- Type CA in State Field PS in Tag field.

- Hit Enter

Script:

- Enter Find Mode

- Set Field[state; "CA"]

- Set Field[Tag; "NP"]

- New Record/Request

- Set Field[state; "CA"]

- Set Field[Tag; "PS"]

- Perform Find

Posted

Thanks for the reply, sbg2.

I think I do need the extend. This is a database with entries for every state. I need the user to be able to specify what state they want to search for, not just hardwire CA into the State field. Most simply stated, I need a script that will ask the user what state they want to search for, then find all records for that state that have ps OR np in the Tag field. I don't want the user to have to enter the "ps" or "np".

Thanks again, I appreciate all the help I can get.

Posted

Create a global text field... for example MyGlobalField. Either use the Custom Dialog Script Step with MyGlobalField as an input field or create a new layout for the search.

Script:

- Set Field[MyGlobalField; ""]

- Show Custom Dialog[MyFile::MyGlobalField]

- Enter Find Mode

- Set Field[state; MyGlobalField]

- Set Field[Tag; "NP"]

- New Record/Request

- Set Field[state; MyGlobalField]

- Set Field[Tag; "PS"]

- Perform Find

Posted

Thanks again, sbg2. That looks like it would work. But here is another solution we worked out:

In the first Find Mode, specify 2 requests: tag=np and tag=ps.

In the 2nd Find Mode, the user enters the "state" for which to search.

- Enter Find Mode [Restore]

- Perform Find[]

- Enter Find Mode [Pause]

- Constrain Found Set[]

Thanks again for your assist. It's nice to have people out there who are willing to help.

-Chuck

This topic is 6676 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.