October 9, 201015 yr I am new to scripting; so I am asking for help with this to allow me to study the logic and try to understand it. I have records in a field "course". These have been imported from an SQL database and has resulted in values from 1-5 in this field. I want to create another field in which these values are interpreted and displayed as "First Year 310"; Second Year 412" etc. What's the easiest way to do this? Case? A value list? I have been trying but not getting too far. Thanks very much for your time. pk
October 10, 201015 yr Hi PK, This Choose statement seems to do what you are asking. Your new field Calculation (Text Result) = Choose ( Course ; 12345; "First Year 310"; "Second Year 412"; "Third Year 514"; "Fourth Year 616"; "Fifth Year 718") HTH Lee
October 10, 201015 yr Another calulation based on Choose ( ) Let([ r = Choose ( Course ; "" ; "First" ; "Second" ; "Third" ; "Fourth" ; "Fifth" ) ; t = If ( not IsEmpty ( r ) ; " Year " & Course * 102 + 208 ) ]; r & t )
October 26, 201015 yr Author Thanks for both contributions. They both worked very well. Since they perform slightly different functions, I got a 2 for 1 deal! ;-) Much appreciated. Edited October 26, 201015 yr by Guest
Create an account or sign in to comment