I wouldn't use an array for that. Use a list of return separated values.
Set Variable [$TheList ; value: List ( "one", "two", "cat", "dog" ) ]
Then you can use the getValue function to reference specific values in that list. GetValue ( $TheList ; 1 ) returns "one" in this example.
That made sense, but when I pass the variable to a Perform Find, it is searching for a literal: "GetValue (one, two, cat, dog)." The same problem persists if I remove "GetValue," only without the "GetValue" part of the text in the search. The problem also exists if I remove the $i variable and use a constant as well (see below). Thanks for any advice.
Here's what I'm doing.
Set Variable [$TheList; value: List ("one", "two", "cat", "dog")]
Set Variable [$TheListReplace; value: List ("one for me", "two for you", "black cat", "red dog")]
Set Variable [$i; Value: 1]
Perform Find (set field "Source" to "GetValue($TheList; $i)
Replace Field Contents (set field "Source" to "GetValue($TheListReplace; $i)
Set Variable [$i; Value: $i + 1]
Exit Loop if [GetValue($TheList; $i) = 0]
You can't use an expression inside stored find criteria.
Enter find mode, use set field to set a field to the specified criteria then perform the find.
See this thread for examples of this method: Scripted Find Examples
I see. I tried the following, but something is still amiss. (and I read through the link).
If it's simple, can you tell me what I would put in the blank below using one of my variables/lists
- Set all variables
- Enter Find
- Set field (set field "Source" to _______________)
Do I need to pass my list to another variable? I've tried different combinations and can't get it to work (even though I've had success with another script using a values list derived from a field). Sorry to trouble you.
The devil can be in the details. Your set field should have this exact format, but with your names in place of mine for the table, field and variable:
Set Field [YourTable::Field ; GetValue ( $VariableList ; 1 ) ]
but since you have multiple values, it should be inside a loop if you want to search for all the listed values:
Set Variable [$K ; Value: $K + 1 ]
Set Field [YourTable::Field ; GetValue ( $VariableList ; $K ) ]
Exit Loop IF [ $K > ValueCount ( $VariableList ) ]
Set Error Capture [on]
Perform Find 
well, I actually did want it outside of the loop, but I had a typo in my variable name...
Sorry! Great help otherwise :)
now the last step of my loop isn't functioning, but I'll figure that part out.