Subfile only shows if there is more than one row of data.

Use this board to ask questions or have discussions with other Genie users.
Post Reply
rmarsh
Profound User
Posts: 56
Joined: Tue Jan 20, 2015 4:28 pm
First Name: Raymond
Last Name: Marsh
Company Name: Cracker Barrel Old Country Sto
Phone: 615-235-4215
Address 1: PO Box 787
City: Lebanon
State / Province: Tennessee
Zip / Postal Code: 37088
Country: United States
Contact:

Subfile only shows if there is more than one row of data.

Post by rmarsh »

I have a subfile screen that is resorting to a standard display when there is one row in the subfile.

How do I fix this so it always shows the subfile?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Subfile only shows if there is more than one row of data.

Post by Scott Klement »

In the screen-level properties turn off subfile detection.

Then, drag a subfile grid widget onto the proper place on the screen. This grid should always be there.
rmarsh
Profound User
Posts: 56
Joined: Tue Jan 20, 2015 4:28 pm
First Name: Raymond
Last Name: Marsh
Company Name: Cracker Barrel Old Country Sto
Phone: 615-235-4215
Address 1: PO Box 787
City: Lebanon
State / Province: Tennessee
Zip / Postal Code: 37088
Country: United States
Contact:

Re: Subfile only shows if there is more than one row of data.

Post by rmarsh »

Thanks Scott. That is what I needed. One follow up question: How do I get this bottom control bar on a grid widget?
subfileexample.JPG
subfileexample.JPG (51.6 KiB) Viewed 2111 times
The above is an example of a subfile that was created as a result of turning subfile detection on and subfile pattern detection on.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Subfile only shows if there is more than one row of data.

Post by Scott Klement »

Select the subfile grid and find the "show paging controls" property. Set this to "true" to enable the previous/next links. (You will probably also want to find the "scrollbar" property and set it to false to get rid of the scrollbar, I'm guessing you don't want both.)
dkmccammon
Profound User
Posts: 48
Joined: Wed Apr 12, 2017 4:44 pm
First Name: Darin
Last Name: McCammon
Company Name: NAICO
Phone: 4052584301
Address 1: 1010 Manvel Ave
City: Chandler
State / Province: Oklahoma
Zip / Postal Code: 74834
Country: United States
Contact:

Re: Subfile only shows if there is more than one row of data.

Post by dkmccammon »

What do you do in this situation when the grid is overlaying another grid? For example I have a grid that is unfolded at the beginning of the program, but the user can unfold the grid, if I were to put a grid on the page from the widgets then that grid would overlay the unfolded grid correct? Another question I have on this is why is it that if the field is blank in a row, say the 3rd row, there is no box there to grab and move around, you have to find a record that has a value in all of the data fields in order to move them.
User avatar
matt.denninghoff
Profound Logic Staff Member
Posts: 115
Joined: Wed Feb 10, 2016 3:53 pm
First Name: Matthew
Last Name: Denninghoff
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Subfile only shows if there is more than one row of data.

Post by matt.denninghoff »

If you've added a grid, but another grid overlaps it when unfolded, then I would just move your grid lower on the screen so that it won't be overlapped. This would leave a gap between the two when the one is folded.

I'm not sure I understand the situation you're describing in not being able to move some fields. Are these fields in a subfile? Since Genie is a screen-scraper and doesn't read your display file, it may not have enough information about the screen to present you with a field. So, until the data for those fields are output in the 5250 stream, Genie is unaware of them. Does that explain your situation?
dkmccammon
Profound User
Posts: 48
Joined: Wed Apr 12, 2017 4:44 pm
First Name: Darin
Last Name: McCammon
Company Name: NAICO
Phone: 4052584301
Address 1: 1010 Manvel Ave
City: Chandler
State / Province: Oklahoma
Zip / Postal Code: 74834
Country: United States
Contact:

Re: Subfile only shows if there is more than one row of data.

Post by dkmccammon »

Moving one grid below the other is not a valid option for us since the first grid takes up the whole page. if we were to put one below the other, then they would both always show, or when unfolded you would have both the folded grid and the unfolded grid with the same data in it. The unfolded is just a summary of the data whereas the unfolded is a detailed view of the data.

For the second question, I have attached a photo for better explanation.
From this photo you can see that there is no data for columns GROSS INCOME, DEDUCTIBLE APPLICABLE, NET INCOME, AND LOSS % RATIO for rows 1 and 2. When there is no data in these columns for that row and you move the grid (the grid in this scenario is detected by genie to render a grid) you cannot move the box that goes inside of the grid that holds the data to where it will line up in the correct row and column since the field is blank. You would think that the genie subfile detection would recognize that each column and row has the potential to hold data and would therefore have a blank "box" to move, but in this situation only the columns and rows that have data will be presented with a box to move. Does that explain the situation better?
grids.PNG
grids.PNG (22.45 KiB) Viewed 2062 times
User avatar
matt.denninghoff
Profound Logic Staff Member
Posts: 115
Joined: Wed Feb 10, 2016 3:53 pm
First Name: Matthew
Last Name: Denninghoff
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Subfile only shows if there is more than one row of data.

Post by matt.denninghoff »

I understand better. I've seen situations where Genie detected a grid, but certain fields on the page were not correctly attached to the grid. In those cases, there are some screen properties you can tweak to fix it. Have you tried setting the "subfile start" and "subfile end" properties?

Also, with folding subfiles, it can get tricky. If you customize it while it is folded, then when the grid is expanded, Genie may read your screen customization and think that you added the grid. It doesn't have enough information to determine that the expanded grid is the same as the folded grid. If you inspect the grid ID property, you may notice it is different when the grid is expanded versus when it is folded.
dkmccammon
Profound User
Posts: 48
Joined: Wed Apr 12, 2017 4:44 pm
First Name: Darin
Last Name: McCammon
Company Name: NAICO
Phone: 4052584301
Address 1: 1010 Manvel Ave
City: Chandler
State / Province: Oklahoma
Zip / Postal Code: 74834
Country: United States
Contact:

Re: Subfile only shows if there is more than one row of data.

Post by dkmccammon »

I have tried the "subfile start" and "subfile end" properties with no luck of it fixing this issue. I did have a goToMeeting with Emily today and she is going to look at the subfile issues.

With the folding, yes the folded vs the unfolded grid have different properties because they have different properties in AS400 as well. The unfolded grid does not get displayed unless an indicator is turned on in the RPG code, which is done by a pressing "F11" or on the Genie by pressing the Chg View button. On AS400 one subfile is shown when the indicator is off and the other when the indicator is on. We can't attach an indicator to a grid from Genie correct? If we cannot do that and cannot have one above the other, what do we do?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Subfile only shows if there is more than one row of data.

Post by Scott Klement »

Dragging the subfile onto the screen manually is not a good solution for a fold/drop subfile, because the data is different in that case depending on the circumstances -- so it has to be auto-detected so that it can work differently in different situations.

The best solution here is to upgrade to a Rich Display instead of a screen-scraper. You have hit the limit on what a screen scraper can do.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests