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

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

Recommended Posts

Posted

I am trying to create a script that will "perform a find" based on the value of a field in the current record. The find criteria will be based on the whatever record is currently "on focus" pardon my access lingo.

How do I do that? What do I type in the criteria box?

Posted

SEt Variable [ $value; YourField ]

Enter Find Mode []

Set Field [YourField; $value ]

Perform Find []

Posted (edited)

thanks for the info just a couple of questions. Do I copy that with no changes (except the field name) right into my script or the criteria box?

If into the script then do i leave the criteria box empty?

Thanks for the suggested reading.

Edited by Guest
Posted

I should mention that this can be done without a script by simply right clicking while the cursor is in the field and choosing FIND MATCHING RECORDS.

You could also extend or constrain the found set in the same manner.

That said, I'm not sure Macs have a right mouse button. The last time I laid hands on a Mac, back in the early 1990's, I think there was only one button.

Posted

From your description, it sounds like you want to be able to have the user choose a field, then perform a find based on that field only. If that's the case, you may want to use the Get( ActiveFieldContents ) and Get(ActiveFieldName) functions. The script may be set up something like

Set Variable [$variable; Get( ActiveFieldContents )]

Set Variable[$field; Get(ActiveFieldName)]

Enter Find Mode []

Set Error Capture [On]

Set Field[$field; $variable]

Perform Find[]

Setting a variable will always refer to the field in the record currently being viewed.

Posted (edited)

Let me see if I have this right. The user may be browsing many records and you would like the user to be able to change the found set so that only the current record is showing. If this is correct then try adding these steps at the proper place in your script or by making them into a new script:

Show All Records

Omit Record

Show Omitted Only

Edited by Guest
Posted (edited)

Ted:

Brilliant! It worked perfectly! I still want to learn more about the set variable, but I will do it later. :-)

Edited by Guest
Posted

Did you click the link?

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