PDA

View Full Version : Trouble with filter


ABC123

Scott Emerick
10-29-2003, 12:49 PM
Hi All,

I have run into something strange here. Can anyone offer some help.

I am trying to create an array using
table.external_content_get()

I am trying to use a variable in my filter, however, I can't seem to get it to work.

This works:
list=table.external_record_content_get("fields","resolution_number+'-'+Type","resolution_number","AIR_CARGO='X'")
vc_recs.initialize(list)

This does not:
list=table.external_record_content_get("fields","resolution_number+'-'+Type","resolution_number","'"+myvariable+"'='X'")
vc_recs.initialize(list)

myvariable is a global variable.

Any ideas on how to make this work?

Thanks,

Scott

Doug Chanley
10-29-2003, 07:32 PM
Hi Scott....

You might try using macro substitution, it works for the keylist_built() function. I know that with Keylist_build, you
cannot use a variable in the filter expression for example, but by using macro substitution you can make it work....

Try searching the board for "macro substitution" this may be of some help ... not sure if it will work with table.external_record_content_get() but it might be worth a look....

doug

JohnZaleski
10-30-2003, 03:13 AM
Using the eval function might do it.

JohnZaleski
10-30-2003, 03:14 AM
or evaluate template

Stan Mathews
10-30-2003, 03:41 AM
Try

""+myvariable+" = \"x\""

Scott Emerick
10-30-2003, 05:02 AM
Thanks Guys !!

Stan, Your suggestion worked. Thank you!!