Data Entry field control

Mike Matthews omnis at lineal.co.uk
Thu Dec 11 11:03:08 EST 2014


> 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,
 Managing Director, SQLWorks Software Ltd

Tel: +44 (0)1271 375999

Email: mike.matthews at sqlworks.co.uk

Web: www.sqlworks.co.uk

SQLWorks replaces Sage, ACT!, Opera, Access, SAP

On 11 Dec 2014, at 15:52, George Ziemann <gzieman54 at gmail.com> wrote:

> My item reference is rField (local variable, item reference)
> The field dataname is fJob.JobCust.
> The field name is JobCust.
> 
> Pertinent section of code (the field is already enabled):
> 
> Clear main file
> Redraw
> Set reference rField to $cinst.$objs.$findname(fJob.JobCust)
> Do $ctarget.$assign(rField)
> Enter data
> 
> The Set reference line returns NULL for rField in the debugger.
> 
> On Thu, Dec 11, 2014 at 5:40 AM, Will Adkin <will.adkin at lineal.co.uk> wrote:
>> 
>> We use this as well
>> 
>> but also - if you calculate a local item ref first that can help debug -
>> if you can’t set a ref to the field then something else is wrong
>> 
>> Set reference lvRef to $cinst.$objs.$findname(pFieldName)
>> Do $ctarget.$assign(lvRef)
>> 
>> Kind regards
>> 
>> Will
>> 
>> Will Adkin, Software Development Manager, Lineal Software Solutions Ltd
>> Apple Reseller, Microsoft Partner, SQLWorks Business Partner
>> office phone: 01271 375999 | web: lineal.co.uk <http://www.lineal.co.uk/>
>> | email: will at lineal.co.uk <mailto:will.adkin at lineal.co.uk>
>> 
>> 
>> 
>>> On 11 Dec 2014, at 12:36, Michael Rowan <michael.rowan3 at gmail.com>
>> wrote:
>>> 
>>> You could ry:
>>> 
>>> Do $ctarget.$assign(FIELDNAME)
>>> 
>>> or  Do $ctarget.$assign(FIELDREF) ; where FIELDREF is an item ref to the
>>> wanted field.
>>> 
>>> in your insert method.
>>> (not tested, from memory)
>>> 
>>> HTH
>>> 
>>> Mike
>>> 
>>> On Thu, Dec 11, 2014 at 9:17 PM, GZiemann <gzieman54 at gmail.com> wrote:
>>> 
>>>> I’m getting re-acquainted with Omnis after being away for several years
>>>> and have forgotten how to do a basic task.
>>>> 
>>>> How do you control the active field when creating a new record? My usual
>>>> Insert method is:
>>>> 
>>>> (do some prep work, like setting main file, set read/write files, etc)
>>>> Clear main file
>>>> Redraw
>>>> Enter data
>>>> If flag true
>>>>       Prepare for insert with current values
>>>>       Update files
>>>> End if
>>>> 
>>>> If I was entering data in a record before I start my Insert method, the
>>>> active field is always whatever field I was last in before I started the
>>>> Insert method.
>>>> I know the secret is in Queue set current field, but wherever I put it,
>> it
>>>> doesn’t seem to work.
>>>> 
>>>> Any help would be greatly appreciated.
>>>> 
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> 
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> 
> 
> 
> -- 
> George Ziemann
> (480) 278-9746
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com





More information about the omnisdev-en mailing list