Page 1 of 1

Subfile within a subfile - can it be done with Profound?

Posted: Mon Dec 03, 2018 11:28 am
by gmunday
Is it possible to have a grid inside a field within a grid? For example I have a subfile of fields and files with certain attributes and in one field I'd like to list all the authorized users to the field/file along with the ability to add/delete users. So the authorized user column would have it's own add/delete buttons. In my head I can't see it as possible but Profound has surprised me before so I thought I should ask.

FileA FieldX Auth Required?=Y Authorized user1
Authorized user2
----------------------------------------------------------------------------
FileA FieldY Auth Required? N
---------------------------------------------------------------------------
FileA FieldZ AuthRequired? = Y Authorized User1
Authorized User2
Authorized User3
-----------------------------------------------------------------------------
Alternately I can load them from an array and add them to the edit screen. Thanks!

Re: Subfile within a subfile - can it be done with Profound?

Posted: Mon Dec 03, 2018 4:10 pm
by Scott Klement
You can't have a grid that's within a grid, no. Grids are loaded from RPG programs via the standard interface of writing rows to a subfile, just as they were in green-screen. There's no way to designate in that interface that you'e writing rows that belong within a row... DDS, open access and RPG don't have that "records within a record" type of capability.

I've seen other customers do something similar (not quite the same, but it might work for you) by having a second subfile alongside the main one. Upon initial load, you make this second grid "hidden". When the user clicks a row (or perhaps a button or icon in the row, something like that) in the first grid, you send control back to the server-side program, and it loads the second subfile with the detail pertaining to that row, and un-hides it. This creates a nice "drill-down" type of effect. In fact, I've seen customers do this is 4 or more grids (all on the same screen) where each one is a drill down from the previous one, etc.... allowing you to drill down many levels.