November 7, 200223 yr I need to run REPLACE through a set of newly imported records Field GL# needs to be set according to another field PGM If PGM="Out Patient" set GL# 4000 If PGM="STDT" set GL 4010 etc. Can someone help me? I think I need Case?
November 7, 200223 yr In your replace by calculated result. Case ( PGM = "Out Patient", 4000, PGM = "STDT", 4010 ) HTH
November 7, 200223 yr Author That did it! I had to add a few more GL#'s ... My old background would have used If( I don't really understand Case yet but I figured it would be Case. Bless you, Andy!
November 7, 200223 yr Case is just like If, except the default value is optional, and also you can run multiple tests without complex nesting. So I almost never use If anymore.
November 7, 200223 yr Author Hey, thanks for clarifying that ... I've got an If/Else attitude and had never used Case before discovering FM. All I know is that, all the posts say to use Case instead of If, and I trust there's a good reason ... now it's makes sense why! I appreciate your input!
Create an account or sign in to comment