LaRetta Posted November 7, 2002 Share Posted November 7, 2002 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? Link to comment Share on other sites More sharing options...
andygaunt Posted November 7, 2002 Share Posted November 7, 2002 In your replace by calculated result. Case ( PGM = "Out Patient", 4000, PGM = "STDT", 4010 ) HTH Link to comment Share on other sites More sharing options...
LaRetta Posted November 7, 2002 Author Share Posted November 7, 2002 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! Link to comment Share on other sites More sharing options...
Fitch Posted November 7, 2002 Share Posted November 7, 2002 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. Link to comment Share on other sites More sharing options...
LaRetta Posted November 7, 2002 Author Share Posted November 7, 2002 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! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7975 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now