Page 2 of 2

Re: Concatonate 2 columns in on subfile column?

Posted: Tue Oct 10, 2017 6:03 pm
by Scott Klement
I'm not sure what you're asking.... do you WANT it to randomly set the borders for the columns? That's kind of what it sounds like.

But, it seems more likely from experience that what you really want is to allow different color attributes within a field without Genie detecting it as a different grid column.

For the latter situation, you can turn off automatic subfile detection for this screen (in the screen-level properties) and manually drag in a grid from the toolbar. You'll have to manually size the columns, etc, but this would allow you to control exactly where/when each column starts/stops rather than having genie auto-detect it from the 5250 protocol data.

If you're trying to make the borders random... I guess it'd be possible (??) using JavaScript code, as long as the borders are consistent for all rows in the grid. But, it might take some fairly sophisticated programming. Of course, that SHOULD be what the auto-detect is already doing, so... not sure this even makes sense.

Re: Concatonate 2 columns in on subfile column?

Posted: Wed Oct 11, 2017 3:04 pm
by dkmccammon
sample1.PNG
sample1.PNG (11.05 KiB) Viewed 1812 times
sample2.PNG
sample2.PNG (40.02 KiB) Viewed 1812 times
Here in the first photo you can see where I have created my own grid and have turned the subfile detection off. However, the grid is not picking up the complete row based on how the data column are defined. The data columns are set as 4, 7, 11, and 14. The grid is 4 columns (first column set to 0 width) and 6 rows. The column set at 14 should pick up everything on that row that starts at 14 and everything thereafter on that particular row. For Example row 4 in the grid should read as follows:
SMT TECHNOLOGIA, C.A.

However, since the words change color with a hex code surrounding "TECHNOLOGIA, C.A.", genie puts that word into a different output field, which does not start in the 14th position. That field starts in the 18th position, these positions past 14 will vary depending on what words are highlighted(color change) in the row. I would like to be able to define that everything on rows 7 thru 12 that is in columns 14 through 80 for example, will be in the 4th column. I have attached the json as well.

Hope this clears up what I am tried to do a bit better. It is kind of hard to explain.

Re: Concatonate 2 columns in on subfile column?

Posted: Wed Oct 11, 2017 4:30 pm
by Scott Klement
The starting row, starting column, and data column properties are normally set by of the auto-detect routine. I've never seen someone set these unless they were using the "detect subfile" option... so I'm not exactly sure what they'll do if you set them manually. I suspect they'll give you the same results that subfile detection does.

Instead, remove the auto-detected subfile. Turn off detection. Drag in a brand new grid from the left, and set the column/row sizes to fit perfectly over what you have on the screen.

Using your JSON dump, I tried it on my system (with my own Genie skin -- so it will look a little different, but works exactly the same) and here's what I got:
terrorists.png
terrorists.png (68.06 KiB) Viewed 1806 times

Re: Concatonate 2 columns in on subfile column?

Posted: Wed Oct 11, 2017 4:39 pm
by dkmccammon
So is the data actually attached to the grid in this instance? because if if the data changes and different words are highlighted then there could be an array of positions those output fields could be at. I have not been able to get a grid to pick up the data (the grid from the left) unless i specify where the data columns are and the starting and ending rows. There have been times that the detect subfile would not pick up the data correctly so I create my own grid and assign the correct data columns, starting row, and ending row and it works perfectly. But this is the first time that I have ran into problems where it highlights words in a column making the data in a certain column multiple colors. What it looks like you did here is simply overlay a grid over the output fields, I don't see how that will work with a varying output fields, for instance if I were to page down even on this, then when the next set of rows appear, there may be different words highlighted and in different places, which would create a different set of output fields than what were previously displayed. If this makes sense?

Re: Concatonate 2 columns in on subfile column?

Posted: Wed Oct 11, 2017 5:00 pm
by Scott Klement
No, the grid is just overlaying the existing fields on the screen... it is not "consuming" those fields into the grid. The user can't tell the difference (unless in design mode) because it shows the grid lines drawn in the right spots, and that's all you're going for here is the "look and feel", right?

Aside from that, the only suggestion I can give you is to re-do the program as a Rich Display where you have more control. But that involves changes to the underlying RPG program -- so I didn't think you'd like that suggestion ;-)

I hope you understand... (you should always keep this in mind when working with Genie) that Genie is a "screen-scraper". The system only sends it the same data it would send to something like Client Access, which is what characters to print on the screen, and the 5250 attributes for those characters. It never tells it anything but what to print... so Genie has to figure out for itself where fields start/stop. It has to also figure out for itself what is/isn't a subfile, what is/isn't a menu, etc. There's only so much you can do in this paradigm... Genie is incredibly sophisticated and has a very high success rate (honestly, it surprises me how well it works -- largely because programmers tend to do everything the same way as the next guy!) But it definitely has it's limitations.

Your DDS knows what belongs to what field, it knows what is/isn't part of the subfile, etc. But it doesn't send this information to Genie.

That's why the Rich Display tool is superior. In that scenario we do know what is part of each field, what is part of the grid, etc, because we have direct access to your display file and RPG code. Plus, we eliminate the 5250 code in that scneario, so we're not limited to only sending data on the screen and 5250 attributes, we can send anything we like, with all the possibilities of HTML5 and JavaScript (millions of times more possibilities than 5250). So it's a much more powerful solution. With one big drawback: You have to make changes (however small) to your programs.

Re: Concatonate 2 columns in on subfile column?

Posted: Wed Oct 11, 2017 5:09 pm
by dkmccammon
Yes we are going for the "look and feel" of a grid. It's just unless I would be able to foresee every type of scenario that would come into play or have the possibility to come into play in the future I would have no way to make sure that the output fields were properly positioned "behind" the grid and have the same font type and size and the correct height and length to make it appear as tho it were in the grid. If this makes sense. I'm all for going with the Rich Display method, but at this moment we are focusing on getting as many screens completed using Genie before going down the Rich Display method. I was hoping that there would be a way, in the data columns, to specify the end of the column since we specify the start of it. This seems like it would allow users to pin point where the columns begin and end, and if they wanted to combine columns, they could do so by simply putting where the column starts and the next one ends in order to combine them. I will have to play around with it until I can figure out something that will work for our scenario here. If I figure something out, I can share what I do/did if you would like, assuming I figure out a way.