Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
610
Converting data field content to custom text
posted

What is the syntax in Expression Assistant for the following example: I have a data field that contains either a Y or an M. If there is a Y, I want the report to say "Years", and if it is an M, I want the report to say "Months".

Parents
  • 110
    Offline posted

    Hi Sylvia,

    You may use an expression like this one (replacing "MyField" by your data field name)...

    =If(MyField.ToUpper() ="Y", "Years", If(MyField.ToUpper() ="M", "Months", MyField))

    The IF(boolExpression, thenExpression, elseExpression) function it's located at the "Other" functions category on Expression Assistant

    Regards,

    CJC

     

Reply Children