Data Entry field control

sam nicol captdan at netspace.net.au
Mon Dec 15 00:58:50 EST 2014


Hi george.

I have found a director field useful.

This field has to have field order as 1, dataname usually #1, $top = -50 so
is not visible but active, enabled

So at the start of any enter data process it will always go here first.
This then can set start fields within the enter data process.


Then in on evbefore
You can queue fields where you want to start
Eg if you are inserting then


on evbefore
   if insert
      queue set current field to JobCust   ( this is the field name and not
               the field dataname which looks like fJob.JobCust)
   else if finding a record
      queue something else
   else  some/any other condition
  end if
  Quit event handler discard event

As I have set up windows to allow multiple instances,
All the file fields are mapped to instance variables.

So prompted find does not work.

I have set up my finds to start either from a menu option or
  by clicking on a field on a window, it starts the find, then my director
field can then queue the clicked field as the first field during enter data.

You then have to know which field received the OK.

Also I find 
     Calculate enterDataFlag  (booleen) = ktrue
Then use 
    Enter data  until enterDataFlag=0
Gives me more control over the enter data.


sam
Oz 0487 3340 068



On 12/12/2014 4:21 am, "George Ziemann" <gzieman54 at gmail.com> wrote:

> I changed my notation to this:
> 
> Clear main file
> Redraw
> 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 lineal.co.uk> 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: 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 16:22, George Ziemann <gzieman54 at gmail.com> 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 http://lists.omnis-dev.com
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> 
> 





More information about the omnisdev-en mailing list