Author: Hiten K M
Posted: 1999-11-10 08:34:18 Link
I have a table in which i store account information after every new record I have to re-query the table to show some updated information which is updated in the aftersave method of the bizObj. I have tried seeking the old value before the re-query but it does not work. If any one has any Idea then please help me !
Hiten K M
hitenkm@emirates.net.ae
www.huiyang.net/hitenkm
Author: Bob Archer
Posted: 1999-11-10 09:39:56 Link
<I><FONT COLOR="#663300">I have a table in which i store account information after every new record I have to re-query the table to show some updated information which is updated in the aftersave method of the bizObj. I have tried seeking the old value before the re-query but it does not work. If any one has any Idea then please help me ! </FONT></I>
If you are ON a record, and you change the record, and save the record, all with out changing the record pointer, you should be able to use Refresh() to re-read the values stored in the table. Don't forget to also Refresh your form so it will show the new values.
BOb
Author: Hiten K M
Posted: 1999-11-10 11:21:57 Link
<I><FONT COLOR="#663300"><I><FONT COLOR="#663300">I have a table in which i store account information after every new record I have to re-query the table to show some updated information which is updated in the aftersave method of the bizObj. I have tried seeking the old value before the re-query but it does not work. If any one has any Idea then please help me ! </FONT></I>
If you are ON a record, and you change the record, and save the record, all with out changing the record pointer, you should be able to use Refresh() to re-read the values stored in the table. Don't forget to also Refresh your form so it will show the new values.
BOb
</FONT></I>
Thanx for the reply. I forgot to mention that on every save I triverse through the table in a spacial sequence and at the end of it I would not know where I will be. Your method will be useful but my case is different.
BTW I did find a solution. I save the PK to a temp var and then seek it in the table and refresh the form. Do u have a better Idea. Please let me
know .
Thank You again.
Hiten K M
hitenkm@emirates.net.ae
www.huiyang.net/hitenkm
Author: Paul Grover
Posted: 1999-11-10 17:18:14 Link
<I><FONT COLOR="#663300">I have a table in which i store account information after every new record I have to re-query the table to show some updated information which is updated in the aftersave method of the bizObj. I have tried seeking the old value before the re-query but it does not work. If any one has any Idea then please help me ! </FONT></I>
The business object has a parameter called lSavePosOnRequery. Set this to .T.
Paul Grover
groverp@wsu.edu
Washington State University at Spokane
Mental Illness Research & Training
Author: Dabo
Posted: 2007-03-28 18:19:36 Link
#1026: Status text getting overwritten too often by record position messages
---------------------+------------------------------------------------------
Reporter: johnf | Owner: paul
Type: defect | Status: assigned
Priority: minor | Milestone: 0.9
Component: ui | Version: 0.8.x
Resolution: | Keywords: status bar
---------------------+------------------------------------------------------
Changes (by paul):
* status: new => assigned
* summary: status bar not being updated => Status text getting
overwritten too often by record position
messages
* priority: trivial => minor
* version: => 0.8.x
* milestone: 1.0 => 0.9
* owner: somebody => paul
Comment:
John, please clarify: the status bar is blank? My status bar shows text
like "Record 1/10".
Note: turning off dForm.AutoUpdateStatusText will keep the "Record 1/10"
messages from overwriting other messages, such as "changes to all records
saved".
We need to look into only displaying the record position messages when the
row number changes.
--
Ticket URL: <http://svn.dabodev.com/trac/dabo/ticket/1026#comment:1>
Dabo <http://svn.dabodev.com/trac/dabo>
Trac Page for Dabo
Author: Dabo Trac
Posted: 2008-10-26 11:25:04 Link
#1026: Status text getting overwritten too often by record position messages
----------------------+-----------------------------------------------------
Reporter: johnf | Owner: paul =
Type: defect | Status: closed =
Priority: minor | Milestone: 0.8.3 =
Component: ui | Version: 0.8.1 =
Resolution: wontfix | Keywords: status bar
----------------------+-----------------------------------------------------
Changes (by ed):
* status: assigned =3D> closed
* resolution: =3D> wontfix
Comment:
Appears to no longer be a problem, so this issue is being closed. If it is
still an issue, please re-open the ticket with more information.
-- =
Ticket URL: <http://trac.dabodev.com/ticket/1026#comment:2>
Dabo Trac <http://trac.dabodev.com>
Trac Page for Dabo
I have this cursor containing a list of clients.
If I do not set any order (set order to 0), the records are shown in
physical order, so if I move the pointer 100 positions down, the record
position is given by recno(), in this case it would be 100.
However, if I order the records by company name and move the record
pointer 100 records down, even though the position would be 100 records
from the top, recno() is not going to tell me where I am.
I need to show that I am in the 100dhs position from the top, regardless
of the order.
I am dealing with a table containing 3 million records, and the
requirement is that the record position be shown very fast.
To clarify, I select the table with the 3KK records and try to find a
certain company. Because the table is now ordered by company name, I
can't use recno() to tell in which position the found company is. If I
move the pointer down or up, the position should move one up or down.
For instance, seek 'WIDGET CO'
The actual record number, as per recno() could be 2348897. However that
record position in the cursor could be 1200, if the pointer is moved one
down, the position would be 1201, or if it were to be moved one up, the
position would be 1199.
So, how can I determine the record position as opposed to recno() if the
table is in any particular order, such as company name ?
Is there a function that can be used?
Rafael Copquin
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/55109504.5000406@fibertel.com.ar
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Rafael,
what is the use? The recordposition in an ordered table is completely
meaningless.
If you realy must now the postiion of your cursor in an ordered table I
would say you will have to build a counter, something in the line of:
lnCounter = 0
go top
do while field=mycondition
lnCounter = lnCounter +1
skip
enddo
? lnCounter
Cheers,
Koen
2015-03-23 23:34 GMT+01:00 Rafael Copquin <rcopquin@fibertel.com.ar>:
> I have this cursor containing a list of clients.
>
> If I do not set any order (set order to 0), the records are shown in
> physical order, so if I move the pointer 100 positions down, the record
> position is given by recno(), in this case it would be 100.
>
> However, if I order the records by company name and move the record
> pointer 100 records down, even though the position would be 100 records
> from the top, recno() is not going to tell me where I am.
>
> I need to show that I am in the 100dhs position from the top, regardless
> of the order.
> I am dealing with a table containing 3 million records, and the
> requirement is that the record position be shown very fast.
>
> To clarify, I select the table with the 3KK records and try to find a
> certain company. Because the table is now ordered by company name, I can't
> use recno() to tell in which position the found company is. If I move the
> pointer down or up, the position should move one up or down.
>
> For instance, seek 'WIDGET CO'
>
> The actual record number, as per recno() could be 2348897. However that
> record position in the cursor could be 1200, if the pointer is moved one
> down, the position would be 1201, or if it were to be moved one up, the
> position would be 1199.
>
> So, how can I determine the record position as opposed to recno() if the
> table is in any particular order, such as company name ?
>
> Is there a function that can be used?
>
> Rafael Copquin
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACUu1SsgizcWi_BPBi2C+m6A97pXxcQy2mc0SLKOARLd9B5CPg@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
I know it sounds like a silly requirement, but my client wants to show
the record position as a "page"
In any case, I tried your solution and it works very well.
Thank you very much
Rafael
El 23/03/2015 a las 19:51, Koen Piller escribió:
> Rafael,
> what is the use? The recordposition in an ordered table is completely
> meaningless.
> If you realy must now the postiion of your cursor in an ordered table I
> would say you will have to build a counter, something in the line of:
> lnCounter = 0
> go top
> do while field=mycondition
> lnCounter = lnCounter +1
> skip
> enddo
> ? lnCounter
> Cheers,
> Koen
>
>
> 2015-03-23 23:34 GMT+01:00 Rafael Copquin <rcopquin@fibertel.com.ar>:
>
>> I have this cursor containing a list of clients.
>>
>> If I do not set any order (set order to 0), the records are shown in
>> physical order, so if I move the pointer 100 positions down, the record
>> position is given by recno(), in this case it would be 100.
>>
>> However, if I order the records by company name and move the record
>> pointer 100 records down, even though the position would be 100 records
>> from the top, recno() is not going to tell me where I am.
>>
>> I need to show that I am in the 100dhs position from the top, regardless
>> of the order.
>> I am dealing with a table containing 3 million records, and the
>> requirement is that the record position be shown very fast.
>>
>> To clarify, I select the table with the 3KK records and try to find a
>> certain company. Because the table is now ordered by company name, I can't
>> use recno() to tell in which position the found company is. If I move the
>> pointer down or up, the position should move one up or down.
>>
>> For instance, seek 'WIDGET CO'
>>
>> The actual record number, as per recno() could be 2348897. However that
>> record position in the cursor could be 1200, if the pointer is moved one
>> down, the position would be 1201, or if it were to be moved one up, the
>> position would be 1199.
>>
>> So, how can I determine the record position as opposed to recno() if the
>> table is in any particular order, such as company name ?
>>
>> Is there a function that can be used?
>>
>> Rafael Copquin
>>
>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/55109D84.1050802@fibertel.com.ar
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Rafael,
I’m glad that Koen’s solution works for you, but it seems like it would be very slow if 2/3 of the records meet “mycondition.” I prefer to create a file that contains the value of the index key of the main file every 1% of the way through. Then regardless of how one gets to a record in the indexed file, the value of the index key just has to be compared to the reference file.
It makes more sense with sample code:
CLOSE ALL
USE MyFile ORDER 1
DO Create_File_Position_Table && Call only when file must be rebuilt
SEEK "BROWN"
? alltrim(str(Find_File_Position())) + "% from top"
PROCEDURE Create_File_Position_Table
DIMENSION aFilePos(101)
nWorkArea = select(0)
SET SAFETY OFF
CREATE TABLE FilePos FREE (Key_Field C(10))
SET SAFETY ON
SELECT (nWorkArea)
GO TOP
APPEND BLANK IN FilePos
REPLACE FilePos.Key_Field WITH replicate(" ", 10)
SKIP reccount() / 100 - 1
FOR i = 2 TO 100
APPEND BLANK IN FilePos
REPLACE FilePos.Key_Field WITH left(evaluate(key()), 10)
SKIP reccount() / 100
NEXT
APPEND BLANK IN FilePos
REPLACE FilePos.Key_Field WITH replicate("z", 10)
RETURN
FUNCTION Find_File_Position
nWorkArea = select(0)
cKey_Content = evaluate(key())
SELECT FilePos
LOCATE ALL FOR cKey_Content <= Key_Field
SELECT (nWorkArea)
RETURN recno("FilePos") – 1
Mike
--------------------------------------------------------------------------------
From: Rafael Copquin
Sent: Monday, March 23, 2015 5:11 PM
To: profoxtech@leafe.com
Subject: Re: record position
I know it sounds like a silly requirement, but my client wants to show
the record position as a "page"
In any case, I tried your solution and it works very well.
Thank you very much
Rafael
El 23/03/2015 a las 19:51, Koen Piller escribió:
> Rafael,
> what is the use? The recordposition in an ordered table is completely
> meaningless.
> If you realy must now the postiion of your cursor in an ordered table I
> would say you will have to build a counter, something in the line of:
> lnCounter = 0
> go top
> do while field=mycondition
> lnCounter = lnCounter +1
> skip
> enddo
> ? lnCounter
> Cheers,
> Koen
>
>
> 2015-03-23 23:34 GMT+01:00 Rafael Copquin <rcopquin@fibertel.com.ar>:
>
>> I have this cursor containing a list of clients.
>>
>> If I do not set any order (set order to 0), the records are shown in
>> physical order, so if I move the pointer 100 positions down, the record
>> position is given by recno(), in this case it would be 100.
>>
>> However, if I order the records by company name and move the record
>> pointer 100 records down, even though the position would be 100 records
>> from the top, recno() is not going to tell me where I am.
>>
>> I need to show that I am in the 100dhs position from the top, regardless
>> of the order.
>> I am dealing with a table containing 3 million records, and the
>> requirement is that the record position be shown very fast.
>>
>> To clarify, I select the table with the 3KK records and try to find a
>> certain company. Because the table is now ordered by company name, I can't
>> use recno() to tell in which position the found company is. If I move the
>> pointer down or up, the position should move one up or down.
>>
>> For instance, seek 'WIDGET CO'
>>
>> The actual record number, as per recno() could be 2348897. However that
>> record position in the cursor could be 1200, if the pointer is moved one
>> down, the position would be 1201, or if it were to be moved one up, the
>> position would be 1199.
>>
>> So, how can I determine the record position as opposed to recno() if the
>> table is in any particular order, such as company name ?
>>
>> Is there a function that can be used?
>>
>> Rafael Copquin
>>
>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/FA55632810084FD893240A4BE36E082C@Studio17
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.