I am using a multi select on a grid and then calling an RPG program to run and print the selected items. After the SetResponse('success':'true') ; I refresh the widget, expecting gSelectionCnt to Zero, but it doesn't and continues to grow. Is there a piece that I am missing? Thanks!
Announcement
Collapse
No announcement yet.
gSelectionCnt not zero'ing
Collapse
X
-
I cannot replicate this. Can you confirm the following below?
1.)The grid has "Checkbox Row Selections" enabled and "Allow Multiple Selections" checked.
2.) You have a button attached to your grid that calls an RPG program.
3.) The back-end program references gSelectionCnt. The back-end program processes and then returns success:true.
4.) Upon succes=true, the front end is reloading the grid (how is it doing this)?
5.) Do the selections against the grid go away after refreshing?
Comment
-
Yes, the selections do go away after refreshing, but the value of gSelectionCnt do not. The only way that i can get the gSelectionCnt to Zero is to close the application...
So here is the RPG Code below:
Dcl-Proc Process;
//SQL: SRMASTP Prefix(SR)
Dcl-s gUser Char(10) ;
Dcl-S lIndex like(gSelectionCnt) ;
Dcl-S X_Exists Char(1) ;
lIndex = gSelectionCnt ;
For lIndex = 1 to gSelectionCnt ;
@Loc = GetSelectionChar(lIndex:'SRLOC') ;
@Itemno = GetSelectionChar(lIndex:'SRITM#') ;
// Check for existing record
Exec SQL Set Option Commit=*None ;
Exec sql select 1 into: X_Exists from QS36F/SRMASTP
where SRLOC = :@LOC AND SRITM# = :@ItemNo ;
If X_Exists <> '1' ;
setResponse('success':'false') ;
SetResponse('msg':'SRLOC &/or SRITM# does Not Exist') ;
return ;
Endif ;
Monitor ;
p_SR0907C(@Loc:@ItemNo:@NbrCopy:@Rtn0907) ;
On-Error ;
@Rtn0907 = 'ER' ;
EndMon ;
EndFor ;
SetResponse('success':'true') ;
SetResponse('info':'Printing completed') ;
gSelectionCnt = *Zeros ;
return ;
image.png?image.png????
Comment
-
I'm going to need to see this run if possible. Can you reach out to support@cnxcorp.com to setup an online meeting?
Comment

Comment