Page 1 of 1
Automated subfile
Posted: Mon Mar 26, 2012 3:01 pm
by leomoore
My manager went through the same training class as I did and believes that we were told that a subfile could be set to automatically scroll without the user using page up or page down. I have no reliable memory the claim nor is it in my notes.
Is there something that will allow this sort of behaviour from a subfile?
Best regards,
Rob Moore
Genuine Parts
Re: Automated subfile
Posted: Tue Mar 27, 2012 10:23 am
by David
Something is coming to mind. As I remember we looked at how to make a certain subfile record be scrolled to the top when the subfile is displayed.
You can use the "subfile record number" property for this. This is equivalent to the SFLRCDNBR keyword on the green screen. You bind this to a field and then move the desired record number in before displaying the subfile. This causes that record to be visible in the current page of subfile records.
You can then set "position at top" to "true" to make that record appear at the top.
If you want to make the position of the subfile records "stick" between redisplays of the subfile, you can bind the "subfile return rrn" to the same field you use for "subfile record number". "subfile return rrn" returns the record number of the top visible subfile record when input is done on the control record.
So, you could do something like this:
1. On initial load, set the field to 1 to get first record at the top.
2. On all subsequent loads, don't set the value anymore. The value used from "subfile return rrn" will be returned on each input and then fed back into "subfile record number".
When done this way (as long as "position at top" is also used) the subfile will always "stick" in the position the user left it at.
Re: Automated subfile
Posted: Tue Mar 27, 2012 10:41 am
by leomoore
I do remember this discussion, now. Thanks for reminding me of the details.