Issue with calling stored procedure

See attached code. In the code, the rule QM_querySPRemedyReceiveSearch is calling the executestoredprocedure function. Notice that I have it inside a with. This means that every time the user pages on the grid or sorts by any column, I WANT to call the SP every time. However, it is only working the FIRST time for some reason. After the second time, it doesn't work. Notice that I have an IF statement. if(local!gridSelection.pagingInfo.startIndex <> local!newGridSelection.pagingInfo.startIndex) The condition on the IF is always met is it is supposed to call the SP but it is not working. Any ideas on why it only works the first time?

testRule.txt

OriginalPostID-202825

OriginalPostID-202825

  Discussion posts and replies are publicly visible

Parents
  • I put it on a load on purpose. Like you said, the first time the form is rendered, both of the gridSelections are equal. Since they are equal, I am NOT calling the SP from the SAIL itself but I am calling it from the process model when the user clicks on a button (none of this I included on the attahed code because I feel it is not relevant) So when the user sorts the grid or pages, then I want local!newGridSelection to be NOT equal to local!gridSelection because that is how I know when I need to call the SP. Does that make sense?
Reply
  • I put it on a load on purpose. Like you said, the first time the form is rendered, both of the gridSelections are equal. Since they are equal, I am NOT calling the SP from the SAIL itself but I am calling it from the process model when the user clicks on a button (none of this I included on the attahed code because I feel it is not relevant) So when the user sorts the grid or pages, then I want local!newGridSelection to be NOT equal to local!gridSelection because that is how I know when I need to call the SP. Does that make sense?
Children
No Data