Neal Matthews
17th January 2007, 13:53
Hello,

I have an exchange condition which only imports records where tdinv921.citm begins with a "1". This works fine but I have now expanded the IF statement to include another field tdinv921.shor to check for > 0 . Now the condition never returns true despite there being several records that meet this condition according to the ASCII file.

I've checked in the debugger and the value of tdinv921.citm is OK but the value of tdinv921.shor is always zero despite the fact that when this field is not in the condition several records are written to the table that have tdinv921.shor > 0.

Any assistance appreciated.

Cheers Neal


table ttdinv921

if (tdinv921.citm(1;1) = "1" and tdinv921.shor > 0) then
return (true)
else
return (false)
endif

en@frrom
17th January 2007, 14:47
Looks like the field tdinv921.shor is not available, therefor value is always 0. Make sure the field will be available..

Neal Matthews
17th January 2007, 15:06
How do I make the field available in respect of an Exchange Condition.

Cheers
Neal

carlosanelo
31st January 2007, 16:11
Hello,

To use conditions in the Exchange, the table fields have to be defined as parameters of the condition. Have you checked that? Maybe the issue is there.

Regards,
Carlos.

Neal Matthews
31st January 2007, 17:24
Hello,

I haven't defined any parameters against the condition but the other field in my condition seems to be working.

I did get round this issue by adding another batch to the condition against a dummy text file which runs a condition which goes through the whole file and deletes shor > 0. Messy but it works.

In the interests of a cleaner solution can you give me some more info on how the parameters work and what I need to define.

Cheers
Neal

bmcfarla
15th May 2007, 19:14
You can only compare in the Execute, Add, Overwrite Conditions fields that are in the Primary Index. All other fields will be be zero or empty.

Neal Matthews
15th May 2007, 19:18
Better late than never and a good way to end the thread.

Cheers Neal

wgarcia
14th October 2008, 17:43
Hello,
You can try this, use underscore and avoid dots in the table fields.

replace dots "." with "_"

example:

table ttdinv921

if (tdinv921_citm(1;1) = "1" and tdinv921_shor > 0) then
return (true)
else
return (false)
endif