Page 2 of 2

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 11:29 am
by jhasz
Ah, my mistake. Here is the response:

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

Let me know if you need any of the source.

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 12:33 pm
by Scott Klement
Thanks! This does not show the SFLSEL field being submitted at all, for any rows. Just to verify: You did have some rows selected, right?

Assuming you did, it's not sending the selections, which means there's a problem somewhere on the client side (i.e. the JavaScript framework.)

You mentioned sending source -- but, the Ctrl-F9 dump that you sent should have all of that information. Unless you're saying that the Ctrl-F9 is working differently for you than the actual application? The problem with source is that it's very hard for me to set up and run so I can debug the code. I'd need all of your database files, with data in them, and all the RPG code and all if it's dependencies, plus the display file of course in order to run that source, which can be a pretty serious undertaking. By contrast, the Ctrl-F9 lets me run your screen very quickly/easily without all of that.

The only problem now is that I'm not having the problem you describe... on my system, when I select the rows and submit them, I can see the values being sent (as you noticed in my screenshot.) But, they aren't sent for you, of course. Now we need to figure out why!

I'm assuming you are selecting a couple of rows and clicking one of the buttons on the screen. Which button are you clicking? (Or were you using an F-key instead? Which one?)

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 12:59 pm
by jhasz
Ok so let me go into a bit of detail. This program creates purchase orders from kanbans, and breaks down to two parts. First, there is a search panel that allows the user to enter a set of constraints and then executes a query based on those requirements. The result set is returned back in the subfile. Once the user has records that are returned, they can be manipulated in one of two ways. They can right click on an individual record and they receive a context menu that allows the creation of a single purchase order. This is currently working, as it goes off of the cursor RRN rather than the subfile RRN. The other option is to select multiple records and then use the "With Selected..." menu at the top of the page to create purchase orders from all selected records. Once the user selects the "Create Purchase Orders" the program starts at subfile RRN 1 and chains through the subfile and reads the record into data strucure SFLIN. If SFLIN.SFLSEL = '1', it processes that record, if it equals '0' it simply passes to the next one. This is where I'm encountering the problem, since the JS is apparently not setting any value to the selection field. Attached is an image of the screen just prior to execution.

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

Re: Selection value not returned to program on chain

Posted: Thu Jan 21, 2016 7:32 pm
by Scott Klement
So to reproduce the problem, I should highlight a bunch of rows and then click the "Create Purchase Orders" option on the "With selected..." menu. Correct?

Re: Selection value not returned to program on chain

Posted: Fri Jan 22, 2016 11:01 am
by jhasz
Correct

Edit:

Interesting thing to note....I attempted to put in a temporary work around by creating a hidden input field in the subfile and used javascript, utilizing the grid API getDataValue and setDataValue functions, to set the value to '0' or '1' based on whether the line was selected or not so that the value would be read into the data structure when the program chains to the record. When I tested it out, the value that is stored in that field is not read, so it appears that any field in the subfile that is manipulated by javascript is not read during the chain.

Re: Selection value not returned to program on chain

Posted: Tue Feb 02, 2016 3:18 pm
by jhasz
Hi, just checking in to see if there was any update to this issue. Thanks!

Jeff

Re: Selection value not returned to program on chain

Posted: Fri Feb 05, 2016 4:37 am
by Scott Klement
Jeff, what I can tell you is that I can reproduce the issue when I click your menu item, like you say. When I use a button instead of your menu to submit the screen, it submits the row selection values without any problems. That's as much as I have had a chance to do with your example.

If you're looking for faster/better service, please use Profound Logic support rather than the "Community Support" offered by these forums. Unfortunately, forums are not given as high priority as stuff filed through our "normal" support procedures.