1 Reply Latest reply on Mar 26, 2013 9:15 AM by philmodjunk






           I have FM12Pro adv and FMServe 12 pro. and Win7.


           Trying to perform a CASE and REPLACE but not working so good.

           I have a Script,which should replace (number) Field "FrUSA" in Database " Allfreights" linking "Shport'fields" both sides.


           T01_ACCOUNTS::Shport="New York";"1200";


           (this is just an short example of Shipping ports,total file upto 600+ destinations in same script.)


           If I make a Trial Script with only one line : T01_ACCOUNTS::Shport="Houston";"800"; then all other destination are set to blank,empty.


           If I run the total scrips (600+) then only a part of it is updated/replaced, but about half of its fields FrUSA are set to zero (0)


           Where is the error ??


           Thanks for helping me out.


        • 1. Re: Case-Replace

               You'll need to supply a bit more detail. I wouldn't use Case in this fashion, I'd use a table of port names and numbers in a relationship, but what you have uses correct syntax (though quotes around numbers are not needed).

               But you don't explain how you are using this calculation to replace data so the issue may lie in how you use the results of this case function.