Subject Re: function form_onNavigate(nWorkArea)
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Mon, 10 May 2021 17:19:46 +0530
Newsgroups dbase.getting-started
Attachment(s) test_locate.prg

Good Evening Roy,

> 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?

This is a strange issue. I have attached a test program.
Have a look at line 4. It is working perfectly as expected. Try this on
your computer.

If it is working then the output should be
true          3
true          1

If not then I would suggest reinstall of dbase.

Once this is sorted out then we move to your .parent notation.
Regards
Akshat



q = new query()
q.sql = [select * from :dbasesamples:orderitems]
q.active = true
?q.rowset.applylocate("partid= 100"),q.rowset.fields["orderid"].value
q.active = false
q.sql = [select * from :dbasesamples:fish]
q.active = true
q.rowset.next(3)
?q.rowset.applylocate("name = 'Clown Triggerfish'"),q.rowset.fields["id"].value
q.active = false