Refresh question on Browse
Posted: Mon Mar 02, 2020 7:40 am
Roger,
I worked around it, but have a question regarding refreshing dc_browse when making major changes in what detail shows.
Creating using a selection on the database: This method is used due to size of database and future filters they will select
x1=0
aRecpro1 := {}
DO WHILE oppro->opstatus == "A" .and. .not. eof()
AAdd(aRecpro1,oppro->(RecNo()))
x1=x1+1
SKIP
ENDDO
if x1=0
AAdd(aRecpro1,oppro->(Reccount()+1))
endif
DC_SetScopeArray(aRecpro1)
DC_DbGoTop()
@ 1,0 DCBROWSE oBrowse ALIAS 'Oppro' ;
NOSIZECOLS PRESENTATION APRES CURSORMODE XBPBRW_CURSOR_ROW ;
SIZE nnn,18 ;
FIT
We have a button to select a filter which is done in a child window. so then it skip records it does not want. Example
x1=0
aRecpro1 := {}
DO WHILE oppro->opstatus == "A" .and. .not. eof()
if !empty(vddiv) .and. opdivtype<>vddiv
skip
loop
endif
AAdd(aRecpro1,oppro->(RecNo()))
x1=x1+1
SKIP
ENDDO
Sends the filter selection and getlist, then refreshes.
The process takes a second or less, even with a high volume of records.
The browse sits there for 15-30 seconds before it refreshes.
I finally exited when the button was selected (closed the browse) to let the user select the filter after the exit), and then it refreshed immediately set in a loop.
I thought there was a refresh on the browse that would do that, but could not find any that did. The obrowse:refreshall() said it was invalid(?) when I tried that when returning from the child window. Found that in your samples and copies/pasted it in, no idea why it was not valid.
Just curious for next time..
Thanks
Fred
Omni
I worked around it, but have a question regarding refreshing dc_browse when making major changes in what detail shows.
Creating using a selection on the database: This method is used due to size of database and future filters they will select
x1=0
aRecpro1 := {}
DO WHILE oppro->opstatus == "A" .and. .not. eof()
AAdd(aRecpro1,oppro->(RecNo()))
x1=x1+1
SKIP
ENDDO
if x1=0
AAdd(aRecpro1,oppro->(Reccount()+1))
endif
DC_SetScopeArray(aRecpro1)
DC_DbGoTop()
@ 1,0 DCBROWSE oBrowse ALIAS 'Oppro' ;
NOSIZECOLS PRESENTATION APRES CURSORMODE XBPBRW_CURSOR_ROW ;
SIZE nnn,18 ;
FIT
We have a button to select a filter which is done in a child window. so then it skip records it does not want. Example
x1=0
aRecpro1 := {}
DO WHILE oppro->opstatus == "A" .and. .not. eof()
if !empty(vddiv) .and. opdivtype<>vddiv
skip
loop
endif
AAdd(aRecpro1,oppro->(RecNo()))
x1=x1+1
SKIP
ENDDO
Sends the filter selection and getlist, then refreshes.
The process takes a second or less, even with a high volume of records.
The browse sits there for 15-30 seconds before it refreshes.
I finally exited when the button was selected (closed the browse) to let the user select the filter after the exit), and then it refreshed immediately set in a loop.
I thought there was a refresh on the browse that would do that, but could not find any that did. The obrowse:refreshall() said it was invalid(?) when I tried that when returning from the child window. Found that in your samples and copies/pasted it in, no idea why it was not valid.
Just curious for next time..
Thanks
Fred
Omni