Examples: Trimming, repeating, adding a new line, and changing case

  1. (@Trim). This example returns [Now is the time], removing all extraneous spaces.
    Untrimmed := "    Now   is   the   time     ";
    Trimmed := @Trim(Untrimmed);
    @Prompt([Ok]; "Untrimmed"; "[" + Untrimmed + "]");
    @Prompt([Ok]; "Trimmed"; "[" + Trimmed + "]")
  2. (@Trim, @ProperCase). This example converts the words in Name to initial uppercase characters and deletes leading, trailing, and extraneous spaces. If " jane j smith" is entered for Name, this formula converts it to "Jane J Smith."
  3. (@Repeat). This example returns "Great Month! Great Month! Great Month!" in the Comments field if the Sales field is 100,000 or greater.
    FIELD Comments := @If(Sales >= 100000; @Repeat("Great Month! "; 3); Sales >= 50000; "Good Month"; "I want to see you in my office");
    SELECT @All
  4. (@NewLine). This example returns the user name and the date separated by a new line.
    @UserName + @NewLine + @Text(@Now)
  5. (@LowerCase). This example returns the user name in lowercase.
  6. (@UpperCase). This example returns the user name in uppercase.