• Skip to main content
  • Skip to footer
Revelwood Logo

Revelwood

Your SUPER-powered WP Engine Site

  • Who We Are
    • About Us
      • Our Company
      • Our Team
      • Partners
    • Careers
      • Join Our Team
  • What We Do
    • Solutions
      • Workday Adaptive Planning
      • IBM Planning Analytics
      • BlackLine
    • Services
      • Implementation Services
      • Customer Care
        • Help Desk
        • System Administration as a Service
      • Training
        • Adaptive Planning Training
        • IBM Planning Analytics / TM1 Training
    • Products
      • DataMaestro
      • LightSpeed
      • IBM Planning Analytics Utilities
  • How We Help
    • Workday Adaptive Planning Use Cases
    • IBM Planning Analytics Use Cases
    • BlackLine Use Cases
    • Client Success Stories
  • How We Think
    • Knowledge Center
    • Events
    • News
  • Contact Us

TI

IBM Planning Analytics Tips & Tricks: Code Char

August 3, 2021 by Lee Lazarow Leave a Comment

Tips & Tricks

Have you ever written a TurboIntegrator script and wanted to check the first character of a value to see if it was a number or a letter? Have you ever needed to insert a single or double quote into a string without “breaking” your code? Have you ever wanted to easily convert a lower case letter into an upper case letter? All of this can be done by referencing the ASCII code associated with the character.

ASCII is an abbreviation for American Standard Code for Information Interchange and is used as a standard for electronic communication. ASCII codes represent text for computers. Every key on your keyboard has a defined code number. Tables associated with these codes can be found via a simple Internet search.

There are two functions in IBM Planning Analytics / TM1 that allow you to reference the ASCII code:

  • CHAR returns the character associated with a numeric ASCII code. For example, CHAR(76) returns a capital L.
  • CODE returns the numeric ASCII code associated with a character. For example, CODE(‘Lee’, 1) returns 67 since the first character is a capital L.

These functions can be used in conjunction with other functions and logic to perform various tasks:

  • If the first character of a value has an ASCII code in the range of 48-57, then the value is a number.
  • If the first character of a value does not have an ASCII code in the range of 48-57, 65-90, or 97-122 then the value is not a number or a letter.
  • ASCII code 39 is a single quote and ASCII code 34 is a double quote.
  • All capital and lowercase codes have the same ASCII code value difference, so you can add or subtract 32 to convert between uppercase and lowercase.

These functions allow you to check and manipulate data without having to ignore the rules of TurboIntegrator coding.

IBM Planning Analytics, powered by TM1, is full of new features and functionality. Need advice? Our team here at Revelwood can help. Contact us for more information at info@revelwood.com. We post new Planning Analytics Tips & Tricks weekly in our Knowledge Center and in newsletters.

Read more IBM Planning Analytics Tips & Tricks:

IBM Planning Analytics Tips & Tricks: Creating Buttons for TurboIntegrator Scripts

IBM Planning Analytics Tips & Tricks: Maintaining Subset-Driven Consolidations

IBM Planning Analytics Tips & Tricks: Compatibility of Views and Subsets

Home » TI

Filed Under: IBM Planning Analytics Tips & Tricks Tagged With: code char, Cognos TM1, IBM Planning Analytics, TI, TM1, TurboIntegrator

Footer

Revelwood Overview

Revelwood helps finance organizations close, consolidate, plan, monitor and analyze business performance. As experts in solutions for the Office of Finance, we partner with best-in-breed software companies by applying best practices guidance and our pre-configured applications to help businesses achieve their full potential.

EXPERTISE

  • Workday Adaptive Planning
  • IBM Planning Analytics
  • BlackLine

ABOUT

  • Who We Are
  • What We Do
  • How We Help
  • How We Think
  • Privacy

CONNECT

Contact:

25B Vreeland Road, Suite 111 Florham Park, NJ 07932
201.984.3030
info@revelwood.com

Copyright © 2023 · Revelwood Inc. All rights reserved. Revelwood® and the Revelwood logo are registered marks of Revelwood Inc.