So I have the following set of extraParams being sent from the front-end (copied from Chrome Developer Tools network tab):
I have the following code in my backend program (NPMPROCESS) to determine which filter fields were specified (these are grid filters):
For some reason, the code inside the for loop will not execute, and it doesn't always happen but I can get it to repeat executing a series of ajax calls. Is it possible that Chrome Developer Tools is lying? If so, how can you tell? As a side note, I've run this through Test RPG call several times, and I cannot get it to repeat the problem. It always returns a "filtered" data set.
Code:
pgm:NPMPROCESS action:getViewData inView:NPM-UPC-GTIN filterFields:[{"field":"NPCOMPY"},{"field":"NPPOOL"}] filterNPCOMPY:1 filterNPPOOL:555
Code:
// prepare vvIn to read json input clear fieldNames; vvIn.variableName = 'filterFields'; vvIn.fieldName = 'field'; vvIn.totalSize = %size(fieldNames:*all); vvIn.elementSize = %size(fieldNames); // get json input and store into array called fieldNames numElements = vvIn_JSON(vvIn:%addr(fieldNames)); // initalize pre-loop values reset dsINMNPM; x = 0; // loop through the number of filters supplied by front end for x = 1 to numElements; // code that never executes endfor;
Comment