About    Download    Order    Support


InnPlanner Reservation Software Videos

About
Download
Order/Prices
Support/Contact
Partner Program
Press Room
Online Help


Recent News

InnPlanner 2010 Released
New faster database engine, more customization features, weekly tariffs, full multi-user work support and much more...

2010 Feb 10

InnPlanner 2010 RC1
InnPlanner 2010 Release Candidate 1 is ready for downloading and testing. You can download it from the "Downloads" section.

2010 Jan 14


Hotel Software Documentation

Text Formulas

Text Formulas

Introduction

Text Formula is a text string consisting of various elements such as record field values, formulas, variables, system values, etc. 

A Text Formula value is calculated directly before it is used. For example, the following Text Formula:

Today: [$_Date], when exported into text document will be replaced with:

Today: 2005-10-10 (if today is October 10, 2005).

Text Formulas can be used in the following cases:

  • In Scripts to set variables and text parameters (for example, message text or field value);
  • In Custom Export Editor for creating export templates; In fact, an export template is one big text formula.
  • In Report Styles to output specific text.
  • Many other places. To find out if the text will be recognized as a formula, simply start typing the formula. If the tags [Tag Text] are highlighted in blue, you can use elements of a text formula here:

For convenient editing of text formulas, the program features a "Text formula editor" that can be accessed by clicking the "..." button on the right of the field to be edited:

Note: Starting from version 5.0 the text formula format was changed. The old format that uses the # symbol is supported but not recommended.

Text Formula Editor

You can edit text manually or use the buttons on the left to insert text formula elements quickly:

  • Variables - allows inserting variables into the text.
    In the text it looks as follows: [$Variable Name], for example: [$total]
  • Fields - allows inserting fields of record into the text. This button can be unavailable if you can't use a text formula for one record type.
    In the text it looks as follows: [Field Name], for example: [Name]
  • Formula... - allows inserting a mathematical formula. Note: a formula is inserted into the text as ready-made, i.e., all text identifiers are replaced with the corresponding number IDs.
    In the text is looks as follows: [%Formula], for example: [%5+sin(f(14))]
  • System Value... - allows inserting a system value into the text. The systems values can be:
    • Date - current date;
    • Time - current time;
    • User Name - the name of the user working with the database. This value should be used when several people are working with the database via network. The name of the user for the client corresponds to the name under which the user has connected to the database; the name of the user for the server is entered at the moment of sharing the database. For more details see section Network.
    • Database Path - a path to the current database, for example "c:\databases\mydb.bbd";
    • Cur Folder Name - the name of the current folder;
    In the text it looks as follows: [$_Value Name], for example: [$_Date]
  • User Input - is available only for text formulas used in the rules. Before checking the rule, the user is instructed to enter the values of the parameters. The text inside the tag is used as the window caption. 
    In the text it looks as follows: [?Comment String], for example: [?Enter date:];.

Special Characters

Sometimes we need to use some special characters like "[","]" in texts, and the program attempts to interpret them as texts. If that's the case, use the following substitutions:

  • Replace [ with :Unknown block: :
  • REPLACE ] WITH ::
  • Replace ; with :':

Formatting Data

To set formatting the data returned by the text formula elements, you have to add another ^ symbol and indicate the formatting string after it. For example (for variables):

  • [Cost^math #0.00], output: 123.00 (2 digits after comma).
  • [Name^text UCASE], output: THOMAS ANDERSON (all capitalized).
  • [Birthday^date dd.mm.yy], output: 16.04.1983 (the date format).

To use the Formatting wizard click a bracketed text formula element, then click the "Set Format..." button. For more details see section Formatting Data.

See Also:

Scripts

Variables

Format

Rules




Today"s Poll

What software do use for your inn/b&b/hotel/etc?

Do not use
Inn Planner
Access, Excel
ASSD
Auberge
Digitalrez
Easy Inn Keeping
EnSuite HR
GuestMaster
iMagic HR
Smart FX
Other