Data Entry field control

Alan Perrin alanperrin at
Fri Dec 12 04:00:04 EST 2014

Hi George

If you are looking to set the FIRST available field for data entry during insert or edit, how about the following just before the Enter Data command :-

... where pFieldNumber is the (tabbing order) number of the target field.

Alan Perrin

-----Original Message-----
From: omnisdev-en-bounces at [mailto:omnisdev-en-bounces at] On Behalf Of George Ziemann
Sent: 11 December 2014 17:21
To: OmnisDev List - English
Subject: Re: Data Entry field control

I changed my notation to this:

Clear main file
Set reference rField to $cinst.$objs.JobCust Do $ctarget.$assign(rField) Enter data

As I step through in the debugger, the rField reference is getting set. But the JobCust field does not become the active field. I tried rearranging the steps as:

Clear main file
Set reference rField to $cinst.$objs.JobCust Do $ctarget.$assign(rField) Redraw Enter data

...but that didn't make any difference.

JobCust is currently the first field in the tab order. My entry fields (which includes JobCust) are set to be disabled, and are enabled in a reversible block at the beginning of the Insert method (before it gets to the Clear main file command that I show here as a starting point).

It occurs to me that if I have a list field in the window which is always enabled and first in the tab order, it gets the focus when all the entry fields are disabled (no matter what field I was previously in). So when I go into Enter data, hitting tab once gets me into the field I want to be in. This is an acceptable workaround to me. I think this is how I used to solve this problem in the past.

I appreciate everyone's responses, but this is just not that big of a deal, so I won't waste any more of your time.

On Thu, Dec 11, 2014 at 9:32 AM, Will Adkin <will.adkin at> wrote:
> Hi George
> Try putting it in quotes: i.e:
> > Set reference rField to $cinst.$objs.$findname(‘JobCust')
> If that fails then make sure that the location of this code is the 
> window that contains the field (i.e. $cinst=containing window)
> if you still can’t set a reference to your entry field then perhaps 
> your filed is contained inside some other object? i.e. a tab pane or a 
> group box… the notation must be exact - if $cinst is your window and 
> the field is in a tab pane called MyTabPane then you would use the 
> following to get a reference
> > Set reference rField to 
> > $cinst.$objs.MyTabPane.$objs.$findname(‘JobCust’)
> Kind regards
> Will
> Will Adkin, Software Development Manager, Lineal Software Solutions 
> Ltd Apple Reseller, Microsoft Partner, SQLWorks Business Partner 
> office phone: 01271 375999 | web: 
> <>
> | email: will at <mailto:will.adkin at>
> > On 11 Dec 2014, at 16:22, George Ziemann <gzieman54 at> wrote:
> >
> >>> Set reference rField to $cinst.$objs.$findname(fJob.JobCust)
> >>
> >>
> >> In this bit, just use JobCust if that is the field name, drop the
> 'fJob.'
> >>> Set reference rField to $cinst.$objs.$findname(JobCust)
> >>
> >>
> >> Mike Matthews,
> >
> >
> > Tried that. Omnis automatically converts JobCust to fJob.JobCust.
> >
> > I even tried changing the field name to Customer (which doesn't 
> > match any of the data names). This results in an error message which 
> > says "Unrecognized variable name, item name or attribute."
> >
> > --
> > George Ziemann
> > (480) 278-9746
> > _____________________________________________________________
> > Manage your list subscriptions at
> _____________________________________________________________
> Manage your list subscriptions at

George Ziemann
(480) 278-9746
Manage your list subscriptions at

More information about the omnisdev-en mailing list