Newbies mille Posted February 12, 2010 Newbies Posted February 12, 2010 HI! I am trying to make a script which should say: If (field A = "Yes") then field C copies the value of filed B End if If (field A = "No" or field A is empty) then field C takes the value 0 End if My problem is making the "then" commands. what type of scriptcommand should I use? I've tried look up, replace, copy/paste and nothing works! I don't know where to place the script either. Can I add in one the fields A, B and C, when they already do have a value? It would be optimal if when I press "yes" in field A, that field C right after takes the value of field B. Should the script then be placed in field A? When I've tried to do that it seems as if i can't press "Yes" then. Hope somebody can help me, and ask if i'm not making sense or is clear in my discription. Regards, mille
mr_vodka Posted February 12, 2010 Posted February 12, 2010 Just make FieldC a calculation field. Then the calc would just be: Case ( field A = "Yes"; FieldB; 0 )
Lee Smith Posted February 12, 2010 Posted February 12, 2010 Hi mille, and welcome to the forum. John (Mr. Vodka) has provided you with one way, by using a calculation, and that is the way I would go. However, if you are wanting to see how this could be script, it would like this: If [ yourFile::Field A = "Yes" ] Set Field [ yourFile::Field C; yourFile::Field B ] Else If [ yourFile::Field A = "No" ] Set Field [ yourFile::Field C; yourFile::Field A ] Else Set Field [ yourFile::Field C; "" ] End If End If HTH Lee
Recommended Posts
This topic is 5398 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