The values that you want to use to initialize are in chPred correct?
Why make it more complicated?
It seems to me that if you know that chPred consists of equality matches (always uses "=") and always uses AND conditions then that string is exactly what you would want to use and it would be awfully easy to parse:
define variable x as character no-undo format "x(30)".
define variable s as character no-undo format "x(30)".
define variable a as character no-undo.
define variable b as character no-undo.
define variable i as integer no-undo.
x = "field1 = 3 and field2 = 5".
do while true:
i = index( x, " and " ).
if i < 0 then
x = s.
else
assign
s = substring( x, 1, i - 1 )
x = substring( x, i + 4 )
.
assign
a = entry( 1, s, "=" )
b = entry( 2, s, "=" )
.
display
s
x
a
b
.
pause.
if i <= 0 then leave.
end.
If the chPred string does not consist of equality matches and AND then you are obviously going to have to pass the values via some other parametrized scheme.