Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5143 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

)

  • 3 weeks later...
Posted (edited)

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 by Guest

This topic is 5143 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.