Hey Chris,

On Thu, Aug 29, 2019 at 1:39 PM Chris Belanger via 4D_Tech <
[email protected]> wrote:

> Yet to show the related data in a listbox (i.e. ‘invoice lines’) as an
> entity selection, the problem is how do you give ‘blank lines.’
>
Take a look at entitySelection.add()
https://doc.4d.com/4Dv17R5/4D/17-R5/entitySelectionadd.305-4128677.en.html

You create a new [invoiceLine] entity (record) and then add it to the
entitySelection.
When you create the new one you can pre-populate it as you like. Don't
forget to also call .save() at some point.



> The choice seems to be to create some ‘previsionary’ records and add them
> to the es_selection you are operating on. I suppose that is a possibility.
> Then a person just needs to ‘link up’ records that ‘really’ belong and
> ignore the rest.
>
I jumped on the ORDA bandwagon pretty early. And in those early days tended
to think about solving problems in ORDA using familiar approaches. This
idea reminds me of some similar schemes I thought up. For myself I found
that when some complicated solution like this was appearing to be the way
to go I wasn't really thinking about the problem in the context of how ORDA
works. In ALP the listbox controlled the data, in ORDA the data determines
what's in the listbox. Like I said before think about the listbox 'showing'
or 'reflecting' the data. So you don't need to 'add' a line to the listbox,
you need to create a new record in the data and the listbox takes care of
itself.

Remember you can create and add a record to the entitySelection without
saving it. So as a UI feature you may want to always add a blank line to
the entity selection and only save it when the user modifies it. You may
already be aware of the option to hide empty lines in a listbox. That might
be useful in this situation to make the visual representation more
accurately reflect the data.

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

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to