Subject Re: function form_onNavigate(nWorkArea)
From roy price <royprice@royprice.name>
Date Mon, 10 May 2021 21:05:55 +1000
Newsgroups dbase.getting-started

On 10/05/2021 8:00 pm, Akshat Kapoor wrote:
> Good Afternoon Roy,
> This is in addition to what Mervyn has said.
>> The fields were text 4ch, but I changed them to numeric, 4ch.
>
> Is there an index to this field.
> If yes then please check the expression and preferably delete and
> recreate it.
> The index is probably stuck with character field type.
>
> Regards
> Akshat
>>
>> this function (which I understand is the syntax for a numeric field)
>> produces a "database engine error".
>>
>> function form_onNavigate(nWorkArea)
>> this.cactusaatext1.rowset.applyLocate( "rec = " +
>> this.cactusaa1.rowset.fields['rec'].value  )
>>
>> But if I change it back to :- (Syntax for text field)
>>
>> function form_onNavigate(nWorkArea)
>>   this.cactusaatext1.rowset.applyLocate( "rec = '" +
>> this.cactusaa1.rowset.fields['rec'].value+"'"  )
>>
>>
>> This worked OK when the field was text, but now it still works, but
>> only for when the contents of the field (4CH) are greater than "1000".
>> IE, nothing under 1000 works.
>
Hello Again,
When the fields were character, they were padded with leading zero's.
As such the syntax as I listed for character works with a similar form
(without the seeker)in a different directory.
In the current directory, where I've added a seeker button for the main
table, the seeker works, but the above does not.

I had already tried adding the "parent" and "parent.parent" to the line
without success.
Adding "parent.parent" gets "Error:  Variable undefined:  PARENT", the
same if I use one "Parent"
The field is indexed and named "rec". I deleted the index saved the
table, and then recreated it, to no avail.
I'm confused as to why the syntax for a character field works for
records containing numbers that are over 1000, but not those under 1000.
Should it not work at all?
Regards
Roy Price