nelliott Posted March 5, 2002 Posted March 5, 2002 I want to check a field for a number of different variables and insert another variable into a different field depending on the result I have tried If field1 = "A" or "B" or "C" Insert text (field2) "A" End If If field = "X" or "Y" or "Z" Insert text (field2) "X" End If But this doesn't seem to work - Please help Regards Nick
andygaunt Posted March 5, 2002 Posted March 5, 2002 I take it you are doing this in a script. You are close... quote: If field1 = "A" or "B" or "C" Insert text (field2) "A" End If If field = "X" or "Y" or "Z" Insert text (field2) "X" End If ON your if lines, to trap for or you must add the field you want to trap on. eg. If field1 = "A" or field1 = "B" or field1 = "C" Insert text (field2) "A" End If
andygaunt Posted March 5, 2002 Posted March 5, 2002 Have you thought about putting this in a calculation field instead of a script. Then it will update automatically. Do it in a case statement and you get a lot more ease of use. Case ( field1 = "A" or field1="B" or "Field1="C", "A", field1 = "A" and field2="X", "AX" (and add as many more items as you wish, just seperate by commas) Anyway, glad we fixed your initial post.
Recommended Posts
This topic is 8303 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