Hi Jim,
I have a couple of thoughts about this. First, for user mode output forms I
stick with plain, old 4D output forms. It's really the best.

Second, I totally support the direction you're going with using a Dialog
and a listbox instead of MODIFY/DISPLAY SELECTION. I would encourage you to
try doing this with arrays instead of selections though. Here are some
reasons I've come to favor this which I'll preface by saying for years I've
been working on a C/S db that's accessed by clients via HTTP so optimizing
transfer rates has been particularly important to me. Also if you do have a
table with lots and lots of fields you likely want to show (or let the user
pick) a smaller selection that's useful in a list. I'm not one who likes to
show listboxes with more than about 20 columns and rarely that many.

Selections can involve a lot more data: when you display a record as part
of a selection 4D moves the entire record from the server to the client.
That can be a lot of data. This can be optimized using the 'store outside
of datafile' option on blobs, text and so forth (which is what that is
really for I believe). So if you are displaying 8 or 10 fields of a record
with dozens or hundreds of fields there's a lot of extra transfer you don't
need.

You have fewer record locking issues: your display form/process can be read
only. Open records for detail viewing/editing in a separate process window
and manage the read/write issues there.

Array operations are fast: Both loading and working with arrays is very
quick. Years ago having enough memory for large selections could have been
an issue but not so much today.

User interactions are faster: there's rarely a comparison between how fast
an array based listbox can respond vs. a selection based one if you've got
a selection of any size.

Use an object array if you can.


My general workflow is:

user inputs some query criteria
send this to the server (execute on server method) to do the query and
return the arrays.


If I am using an object array I populate it with objects containing the
relevant data for each record.
If I'm using arrays I pass pointers to the arrays to the query method.
In both cases you can get a performance boost by declaring local arrays you
need in the query method and use COPY ARRAY to populate the return objects.


On Tue, Oct 23, 2018 at 5:14 PM Jim Crate via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I have a form with a selection-based listbox which I use as an output
> form. In runtime mode, you just use DIALOG instead of DISPLAY SELECTION. If
> I set that form as the output form, it doesn’t work in User mode, it just
> says “There is no form selected to display the records of: [My_Table]”. Is
> there a way to get this to work in User mode?
>

-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to