Table Properties

Martin Obongita martin.obongita at
Wed Aug 30 02:46:28 UTC 2023

My reading of your answers mean that there is no way in Omnis you can return the property of a class without manually coding it.
Properties of a window class include aligntogrid, alwaysenabledobject, cancelkeyobject etcProperties of a table class include allowrowsfetched, canremotedebugwhenlocked etcProperties of an object class include canremotedebugwhenlocked, classtype, collectperformancedata etcProperties of a report class include alightogrid, callprintonexport, canremotedebugwhenlocked etc

These are the properties of a class I would wish to return from a call.

Sent from Yahoo Mail for iPhone

On Monday, August 28, 2023, 9:19 PM, Doug Easterbrook via omnisdev-en <omnisdev-en at> wrote:

or, in addition to what Andy says ….  you can set the main table in a variable in the $construct of the table class…

and make your own accessor method.

We do both.

all our sql tables are defined based on a table or query class.    The query class can have files across multiple tables.

so, in the $construct, we might

calculate iMainTable as ‘MyTable’

or we might automate it to look at the first variable in the query class (since you know that)…

and then we’d make a method like

    Return iMainTable

and to use it, you can do

do list.$getMainTable returns theMainTable

the great thing about table classes is that you can have your own methods and instance vars.  How you set things up is up to you.            but the concept of instance vars and accessor methods (or setter methods) ….    worthwhile using.

There will be talks at Euromnis  about making table classes generic, improving performance and sample code.  its well worth coming.

Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at
Phone (403) 650-1978

> On Aug 28, 2023, at 8:47 AM, TBS <andyh at> wrote:
> You can also try :
> Calculate #S5 as dataList.$sqlclassname - which - although not the table name, if you are careful in your sqlclassnames can be used to get to the table name !!!
> Andy Hilton
> Totally Brilliant Software Inc
> Phone (US) : (863) 409 4870
> Phone (UK) : 0207 193 8582
> Web :
> Helpdesk :
> Email : andyh at
> On Aug 28, 2023, 10:28 AM -0400, Martin Obongita via omnisdev-en <omnisdev-en at>, wrote:
>> Hi Kelly,
>> If I right click on the iDataRow and select interface manager then I click the properties tab, I can see $desc and $name in the list in red color.
>> Martin.
>> On Monday, August 28, 2023 at 11:23:13 AM GMT+3, Kelly Burgess <kellyb at> wrote:
>> Hi Martin,
>>> I have an instance variable list its subtype defined as a table class.
>>> I am able to get its table name property with the command:
>>> Calculate iTableClassServerName as iDataRow.$servertablenames
>>> I have tried to get its properties below but fails:
>>> Calculate iTableClassServerName as iDataRow.$desc
>>> Calculate iTableClassServerName as iDataRow.$name
>> What kind of properties are you wanting to see?  I don't think $desc is a valid property of a list or row.
>> If I inspect a table instance, $name is the name of the table instance.
>>    Set reference tref to $clib.$tables.tAddresses.$insts
>>    Set reference tref to tref._____284_tAddresses
>>    Calculate #S1 as tref.$name        ##  "_____284_tAddresses"
>>    Calculate #S2 as tref.$ident        ##  613
>> If I inspect a list, $name is the name of the list.
>>    Do dataList.$definefromsqlclass('tAddresses',,tSessionRef)
>>    Calculate #S3 as dataList.$name        ##  "dataList"
>>    Calculate #S4 as dataList.$servertablenames    ## "addresses"
>> Are you wanting to see session properties?
>>    Calculate #S5 as dataList.$sessionobject.$damname    ## "FRONTBASEDAM"
>>    Calculate #S5 as dataList.$sessionobject.$transactionmode        ## "kSessionTranManual"
>> I don't think there's a way to obtain the Table classname directly from a list - you'd need to infer it from $servertablenames, based on your naming conventions.
>> Kelly
>> _____________________________________________________________
>> Manage your list subscriptions at
>> Start a new message -> mailto:omnisdev-en at
>> _____________________________________________________________
>> Manage your list subscriptions at
>> Start a new message -> mailto:omnisdev-en at
> _____________________________________________________________
> Manage your list subscriptions at
> Start a new message -> mailto:omnisdev-en at 

Manage your list subscriptions at
Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list