Omnis Command Reference

Omnis Software Ltd
July 2019


The software this document describes is furnished under a license agreement. The software may be used or copied only in accordance with the terms of the agreement. Names of persons, corporations, or products used in the tutorials and examples of this manual are fictitious. No part of this publication may be reproduced, transmitted, stored in a retrieval system or translated into any language in any form by any means without the written permission of Omnis Software Ltd.
© 1999-2019 The Apache Software Foundation. All rights reserved.
This product includes software developed by the Apache Software Foundation (
OMNIS® and Omnis Studio® are registered trademarks of Omnis Software Ltd.
Microsoft, MS, MS-DOS, Visual Basic, Windows, Windows 95, Win32, Win32s are registered trademarks, and Windows NT, Visual C++ are trademarks of Microsoft Corporation in the US and other countries.
SAP, R/3, mySAP,, xApps, xApp, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world.
IBM, DB2, and INFORMIX are registered trademarks of International Business Machines Corporation.
LINUX is a registered trademark in the US and other countries exclusively licensed by X/Open Company Ltd.
Sun, Sun Microsystems, the Sun Logo, Solaris, Java, and Catalyst are trademarks or registered trademarks of Sun Microsystems Inc.
MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries (
ORACLE is a registered trademark and SQL*NET is a trademark of Oracle Corporation.
SYBASE, Net-Library, Open Client, DB-Library and CT-Library are registered trademarks of Sybase Inc.
Acrobat is a trademark of Adobe Systems, Inc.
Apple, the Apple logo, AppleTalk, and Macintosh are registered trademarks and MacOS, Power Macintosh and PowerPC are trademarks of Apple Computer, Inc.
HP-UX is a trademark of Hewlett Packard.
OSF/Motif is a trademark of the Open Software Foundation.
CodeWarrior is a trademark of Metrowerks, Inc.
This software is based in part on the work of the Independent JPEG Group.
This software is based in part of the work of the FreeType Team.
Other products mentioned are trademarks or registered trademarks of their corporations.

About this Manual

This manual contains a complete list of 4GL commands available in Omnis Studio, arranged in alphabetical order. See the Omnis Programming manual for further information about using the Omnis commands.

Each command has the following information, as well as the syntax, description, and an Omnis code example.

Command group Flag affected Reversible Execute on Client Platform(s)
Functional group, e.g. “Constructs” Whether or not (YES/NO) the command sets the flag when it executes; if the command executes successfully the flag is set to True, if it fails the flag is set to False. Whether or not (YES/NO) the command is reversed when it is executed within a reversible block; see Begin reversible block command. Whether or not (YES/NO) the command can be executed in a client method in the JavaScript Client Which platform the command is available on, including: Windows, Linux, macOS; All indicates the command is available on all platforms

Command Groups

In versions of Omnis Studio prior to version 10.x the commands were arranged in groups in the Method Editor, but the command groups no longer appear in the editor. The commands are listed here in the same functional groups for your convenience.

Calculations Changing data Classes Clipboard
Constructs Data files Data management Debugger
Enter data Error handlers Events Exchanging data
External commands Externals Fields Files
Finding data Importing and Exporting Libraries List lines
Lists Menus Message boxes Methods
Omnis environment Operating system Parameters and variables Report destinations
Report parameters Reports and Printing Searches Sort fields
SQL Object Commands Tasks Text Threads
Toolbars Windows

Obsolete Commands

Some of the Obsolete Commands have been removed in Studio 10.x: they are listed here: Obsolete Commands

Command Filters

The commands in Omnis perform many different functions, including many legacy features that are no longer required for creating web and mobile apps using the JavaScript Client. There is a filter mechanism in the Method Editor to filter the list of commands that are displayed in the Code Assistant help list, primarily to remove any old commands, including those that allow you to manage Omnis datafiles.

Note you can still use the excluded commands in your code, and methods in converted libraries using these commands will continue to work – the filters just hide the commands from the Code Assistant help list.

The command filter is set under the Filter Commands submenu in the Modify menu in the Method Editor: note this is only visible when the cursor is in the code text entry area. The Exclude Old Commands filter is enabled by default, which excludes over 200 old commands, plus there are other filters available that exclude smaller subsets of commands. You can disable the current filter using the No Filter option, in which case all the commands available in Omnis will be shown in the Code Assistant help list.

Client Commands

The following commands can be executed in a client method in the JavaScript Client.

# Comment Begin text block Break to end of switch Calculate
Case Default Do Do inherited
Do method Else Else If calculation Else If flag false
Else If flag true End For End If End Switch
End text block End While For field value Get text block
If calculation If flag false If flag true JavaScript:
Jump to start of loop OK message On On default
Quit event handler Quit method Repeat Send to trace log
Set reference Sound bell Switch Text:
Until calculation Until flag false Until flag true While calculation
While flag false While flag true

Error Codes

FileOps Error Codes Web Error Codes