Subrecords disappear in On Display Detail event?

Justin Leavens (5/8/14 12:31PM)
Justin Leavens (5/8/14 12:37PM)


Justin Leavens (5/8/14 12:31 PM)

Justin Leavens wrote
color><param>00000,0000,DDEE/param>II'm trying to populate a variable
on the output form list for each record
displayed. Let's say for most simplistic purposes I'm just trying to
display a count of the number of subrecords in the specific subtable
for
each record displayed.

In standalone, Records in subselection([Table]Subtable) in that On
Display
Detail event properly tells me how many subrecords there are. In
client/server, it's always zero. Same form displayed, same records
displayed. The debugger window shows the same discrepancy. Even an ALL
SUBRECORDS([Table]subtable) in the code still leaves me with zero
subrecords, even though I know some exist.
/color>
I think I'll just admit that I'm lucky that subrecord commands work as
well
as they do, and do my best to convert to using Get subrecord key in
the few
places where the subrecord commands break. Just a drag that this works
in
the one mode but not the other... so close!

--
View this message in context:

http://4d.1045681.n5.nabble.com/Subrecords-disappear-in-On-Display-Detail-
event-tp5730253p5730298.html
Sent from the 4D Tech mailing list archive at Nabble.com.

Justin Leavens (5/8/14 12:37 PM)

Tim Nevels wrote
color><param>00000,0000,DDEE/param>OOn May 8, 2014, at 11:31 AM,
Justin Leavens wrote:

/color><color><param>8826F,0000,8219/param>II'm trying to populate a
variable on the output form list for each record
displayed. Let's say for most simplistic purposes I'm just trying to
display
a count of the number of subrecords in the specific subtable for each
record
displayed.

In standalone, Records in subselection([Table]Subtable) in that On
Display
Detail event properly tells me how many subrecords there are. In
client/server, it's always zero. Same form displayed, same records
displayed. The debugger window shows the same discrepancy. Even an ALL
SUBRECORDS([Table]subtable) in the code still leaves me with zero
subrecords, even though I know some exist.
/color><color><param>00000,0000,DDEE/param>
Hi Justin,

Looks like you have found a bug in the legacy subrecord support and a
4D
Client optimization. You know how you get optimizations in output forms
with 4D Server having it only send the columns needed to be displayed
in a
MODIFY SELECTION command. 4D Standalone does not do these
optimizations.

Try coding a query using the "Get subrecord key" command. This will let
you do a real QUERY to get the subrecords instead of using the ALL
SUBRECORDS command. ?Then you can treat the subtable like a real
table.

Check out the example query code in the docs.

http://doc.4d.com/4D-Language-Reference-13.5/Subrecords/Get-subrecord-key.
301-1457643.en.html
/color>
Thanks, Tim. I had just discovered that command, and thank you for
pointing
out the specifics on the issue. Get subrecord key seems to provide a
good
way to bridge the old and new and will dim the pain of having to
re-code big
chunks of old apps in one fell swoop.

--
View this message in context:

http://4d.1045681.n5.nabble.com/Subrecords-disappear-in-On-Display-Detail-
event-tp5730253p5730299.html
Sent from the 4D Tech mailing list archive at Nabble.com.

Reply to this message

Summary created 5/8/14 at 7:45PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com