Re: forms 4.5 - tricky focus

From: Marc Nicholls <marc.nicholls_at_mcmail.com>
Date: 1998/03/23
Message-ID: <3516db5d.0_at_news1-hme0.mcmail.com>#1/1


Ariel,

Q1) How can I remain in the same spot while performing these operations ?

A1) You could you a PL/SQL table on the server which would store a list of selected values, which you could then use within a stored procedure to do your update. Values in the list could be added or removed when the user selects or deselects records from the block. This would certainly be quicker than scrolling through the records if the block has many rows.

Q2) how can I return to the same spot after each operation, so as not to confuse the user and make him/her disoriented ?

A2) You could save the current record as already suggested. In addition to this you could work out what the last record displayed is before you do your loop

save_record := To_Number(:System.Cursor_Record); last_record_viewable := LEAST(to_number(get_block_property(<BLOCK>, QUERY_HITS)), to_number(get_block_property(<BLOCK>, TOP_RECORD)) + to_number(get_block_property(<BLOCK>, RECORDS_DISPLAYED))); ...
your loop
...
Go_Record(last_record_viewable);
Go_Record(save_record);

The addition of last_record_viewable means that the records within the multi-record block will all be in the same position as before you started the loop, whilst the current record will, as before, be the same.

Hope this helps
Regards
Marc

Ariel Kirson wrote in message <351513B1.5312C163_at_exlibris.co.il>...
>Hey there,
>
>I have just finished implementing multiple
>selection
>of rows in a FORMS 4.5 table. This in itself was
>a
>tedious experience, but I have run into a new
>problem
>along the way.
>
>After I have performed an operation on multiple
>selections,
>I lose track of where I was before. i.e. I have
>chosen 3 records
>from the table and requested to update their
>status - immediately
>following this operation, the statuses are updated
>(by looping
>through all the records and performing the
>operation on each
>record in the selection), but the records
>displayed in the table
>are no longer the same records displayed before.
>
>My question:
>
>How can I remain in the same spot while performing
>these
>operations ? Or perhaps, how can I return to the
>same spot
>after each operation, so as not to confuse the
>user and make
>him/her disoriented ?
>
>Many thanks,
>
>Ariel Kirson
>Ex Libris Ltd.
>
Received on Mon Mar 23 1998 - 00:00:00 CET

Original text of this message