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

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

Recommended Posts

Posted

i was wondering if i can do a find based on the content of another (global) field.

the point is that i need a script that can perform different finds every time. so i was thinking to make the find look in a global field which value will be set in the beginning of the script based on the value i'd like to search on.....

Posted

You mean, the you want to search for all records where field X contains the value that is stored in a global field Y? Then, yes it's quite easy.

Script:

Enter Find Mode [ No restore]

Set Field [X , Y]

Perform Find [No restore]

<<Edited: my code disappeared when I originally posted this>>

Posted

not really....

when you do a script with find in it fm remembers the last search (find) you did and puts that into the script. i want to do a find that's defined by the contents of a field. that way i can change the content of that field every time in the beginning of the script and get different results every time with the find....

in your example above what is find looking for? X or Y?

thanks....

Posted

It doesn't restore the last find request if you un-check the restore option in the Enter Find and Perform Find steps.

Suppose field X is the field you want to search and contains the names of cars. Suppose global field Y contains "Toyota". The script will find all records where field X contains "Toyota".

Posted

well, i tried all the options and still get that the message that there is no valid criteria....

what i did is this:

i have a text field - txt and a txtG wich is a global text field. i did a find on one of the values in the txt field manualy (it doesn't let me do it on the txtG) and then did a script like this:

Enter Find Mode[] ( no restore)

set field ["textG","txt"]

Perform Find[] ( no restore)

then i select a record and do the script. i get the error of no criteria.

if i don't do find before creating the script - same result...

how do i do a find on the global field ot how do i set up the script to look in that field?

what am i doing wrong??!!?

Posted

There's no point in doing a find on a global.

Read Bob's script again. You have it reversed.

Posted

I.e.^_^

set field ["textG","txt"]

should be:

set field ["txt","textG"]

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