Page 1 of 2

Selection value not returned to program on chain

Posted: Mon Jan 18, 2016 12:44 pm
by jhasz
Hi,

I've encountered an issue where the selection value of a record in a subfile is not being sent back to the program as it chains. This happened to me once before and the only solution I found that works is to scrap the display file and recreate it, copying it does not fix the problem. At this point, I do not want to have to do that and am looking for any suggestion that I may have overlooked.

Here is the definition:
https://drive.google.com/file/d/0B4I9Vb ... sp=sharing

Here is the read into the data structure from a record that is selected:
https://drive.google.com/file/d/0B4I9Vb ... sp=sharing

The interesting part is that the selection value is the only field not being read into the data structure, regardless of whether or not it is selected. I can't speak as to what would make the display behave this way, the last thing I did was add another input field to the search panel that sits next to the subfile. Thoughts?

Thanks,

Jeff

Re: Selection value not returned to program on chain

Posted: Mon Jan 18, 2016 2:48 pm
by Scott Klement
Gosh, I sure hope nobody at Profound Logic suggested that you scrap your display and re-create it?! Doing that SHOULD never make a difference, and if it does, something is wrong that needs to be fixed!

If you can reproduce the problem where the SFLSEL (in this example) is not being set when it should be, can you please press Ctrl-F9 on that display? This will generate a download file named json.txt. Please post that file here so we can take a look at it.

Re: Selection value not returned to program on chain

Posted: Mon Jan 18, 2016 3:08 pm
by jhasz
Hi Scott,

Thanks for the quick reply. No, no one suggested it haha. It was the last thing I could think of, the first time this happened, to remedy the situation. Here is the json file, let me know if anything looks amiss to you.

https://drive.google.com/file/d/0B4I9Vb ... sp=sharing

Edit: I exported this immediately after the first chain to the subfile, FYI.

Re: Selection value not returned to program on chain

Posted: Wed Jan 20, 2016 9:03 am
by jhasz
Any progress on this? Thanks.

Re: Selection value not returned to program on chain

Posted: Wed Jan 20, 2016 1:02 pm
by jwilliams
Hi Jeff, I created a support ticket for you, #2283. We will try to recreate the problem and follow up through email.

Re: Selection value not returned to program on chain

Posted: Wed Jan 20, 2016 7:17 pm
by Scott Klement
Jeff, I took a quick look at your JSON dump. What I did was select two records in your grid and then click the "Search" button. I looked in the browser's developer tools to see what was being submitted back to the server when I did that, and I saw this:

Code: Select all

RESULTSFL.SFLSEL.1		1
RESULTSFL.SFLSEL.2		1
The subfile row is appended to the variable names, so RESULTSFL.SFLSEL.1 means the SFLSEL field for row 1 in the RESULTSFL record format, and RESULTSFL.SFLSEL.2 would be row 2. As you can see, both are shown as 1, meaning they are selected.

Can you try that same thing on your end? Put the screen up on the display and open up your browser's debugging tool. enable the "Network" (or "Net") panel in the debugging tool, then select the two rows and submit them. Look in the network tab to see what is submitted to the server. (The precise steps to look at the Network tab will vary depending on which browser you use, but all of them support something like this.)

What I'd like to know is whether the browser's network tab shows the correct thing, but the RPG program does not. If that's the case, it means there's a bug in the open access handler. But, if the browser shows the wrong thing, it means there's a bug in the JavaScript framework. The Ctrl-F9 dump you sent only lets me test the JavaScript framework, and so far I have not been able to reproduce the problem. I want to make sure I'm looking in the right place!

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 9:49 am
by jhasz
Hi Scott,

I performed the network response check on Firefox and Chrome and both results mirrored each other:

"response":"field names":["SFLARTCOMP","SFLBUYER","SFLCYCLE","SFLDESCR","SFLITEM","SFLKBID","SFLKBNUM","SFLPLANNER","SFLQTY","SFLSEL","SFLSUPP","SFLTRGDATE","SFLUSAGE"],
"data":[
["VCOA","d - PETER WOODHOUSE","0","24IN AB1 ADJ BKT SUBASY","A240AB1ADJ","704110","N00704110","2 - PETER WOODHOUSE","10","","CH-39245","01/20/2016","CH"],["VCOA","d - PETER WOODHOUSE","0","24IN AB1 ADJ BKT SUBASY","A240AB1ADJ","704111","N00704111","2 - PETER WOODHOUSE","10","","CH-39245","01/20/2016","CH"],
["VCOA","d - PETER WOODHOUSE","0","24IN AB1 ADJ BKT SUBASY","A240AB1ADJ","704112","N00704112","2 - PETER WOODHOUSE","10","","CH-39245","01/20/2016","CH"],["VCOA","d - PETER WOODHOUSE","0","24IN AB1 ADJ BKT SUBASY","A240AB1ADJ","704113","N00704113","2 - PETER WOODHOUSE","10","","CH-39245","01/20/2016","CH"]]}}

As you can see, the fourth value from the end is the SFLSEL field and it does not contain a value.

Here is the full dump if you require more detail. As a side note, we just upgraded our development environment to the latest release of Profound a couple of weeks ago.

Full Response Dump:
https://drive.google.com/file/d/0B4I9Vb ... sp=sharing

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 10:45 am
by Scott Klement
Jeff,

I'm looking for information about what the JavaScript framework is sending to the handler. You are showing me the opposite (what the handler is sending to the display).

Any chance you could show me what is sent in the request from the framework to the handler?

Thanks!

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 10:57 am
by jhasz
My apologies, is this what you're looking for, the response to PUI0009103?


{"success":true,"response":[new Option("Test","8"),new Option("","9"),new Option("Test2","10"),new Option("Test3","11"),new Option("Test5","20")]}

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 11:09 am
by Scott Klement
Jeff, that is the response from an SQL statement to load a drop-down widget. It has absolutely nothing to do with the row selection stuff that we are working on.

I'm looking for the data that is sent from the client to the server. This might be referred to as "POST data" or "Request Data" etc. It is NOT in JSON format. The stuff you're sending is a response from the server... I need the request from the client, not the response from the server...

Here's a screenshot using the Firebug tool, for example. (You don't have to use the firebug tool, that just happens to be what I'm using at the moment -- the same info should be available in any of the different browser's developer tools, but the display may look different)
jeffReq.png
jeffReq.png (93.92 KiB) Viewed 2770 times