× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a matter of style and programmer's preference (and also shop
standards).

I usually reload the subfile when the user has performed a function to
change the contents of the subfile in a significant way, as in an add or
a delete.

I save the subfile rrn of a record on the page that was displayed at the
time so that i can reposition the subfile back to that rrn on redisplay.
If you are doing a page-at-a-time subfile then I would save the key
fields of the main file and position the subfile page load from the key
values.

General logic flow:

load subfile
dou userExit
exfmt
processFunctionKeys()
If reloadSubfile flag is on

reloadsubfile()
iter
endif ProcessSubfileoptions()
If reloadSubfile flag is on
reloadsubfile()
endif
Editinput()
enddo

---
Paul

On 2016-08-19 13:38, Stone, Joel wrote:

PGMA displays 10 records in a file using a subfile. Then the user pages down 4 times to show the last 10 of 50 records.

When the user presses F9 to add a record, I call PGMB to do that work, and then return to PGMA.

In PGMA, I would like to redisplay the last 10 of the now 51 records. Or maybe show the last 10 of 50, and a page-down will reveal the newest record.

It should also function properly if the user is in the middle of 50 records in the subfile, and does an add of the 51st record.

What is a good method to handle this? Or what is a common method that works?

Upon a record being added, do you re-load the SFL from the start? And load all 51 instead of loading the usual 10?

Other ideas?

Thanks!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.