chingi
10th December 2004, 11:01
Hi All,
Can anybody let me know how Conditions can be used in Exchange Scheme. If possible with some examples.
Regards
Chingi
fmorais
10th December 2004, 14:01
Very open question you are making...
If you are referring to the conditions in the field relations, you can use them to make more complex transformations between the ASCII file and the Destination/Origin Table, than the standard field, relation, constant or series possibilities.
Example:
When importing data, you want to put a value in a field which depends on something other that is on the baan database and also some other field in the ascii file:
|**********************************
table ttccom001
select tccom001.cwoc
from tccom001
where tccom001._index1 = { :ascifield1 }
selectdo
if cwoc = TR1 and asciifield2 <> 345 then
return("AAA")
else
return("BBB")
endif
endselect
return("")
|*****************************
In this case you would have to put asciifield1 and asciifield2 as input parameters to the condition.
The value "AAA" or "BBB" is put in the destination field.
Hope this helps
Fred
Francesco
10th December 2004, 15:38
Exchange offers full 3GL in its conditions. Basically, the conditions are pasted in a pre-existing program.
That means that you can go as crazy as you want with your conditions. The combination of exchange and API for example opens a whole wide world of possibilities.
Have fun.