Thanks for your input, everyone.

I have used calls to the server in my code quite extensively so I am competent 
and confident in doing that.
It’s good there is a simple method of getting the server to give a client the 
information it wants.

Maybe if I explain why I want(ed) to do this:

COMBO BOX MANAGEMENT
In pre-17 code, I typically keep a set of arrays up-to-date on the server with 
the values / keys of various records / selections for use as CHOICE LISTS.
Think of these as MASTER CHOICE LISTS maintained on the server. They are 
comprised of a combination of an ARRAY of NAMEs and of KEYS
The NAMEs are used to present to the user as the CHOICE LIST.  The KEYS are 
what get stored in the Many Field of the related table.

i.e.
PROJECT ENTRY SCREEN
CUSTOMER:  |________________    -> this is a comboBox (with clairvoyance) that 
contains the [Customer]NAMES. As this changes, the [Project]Customer gets 
updated with the [Customer]ID  (both NAMES and ID are maintained in server 
arrays)

Whenever a record is updated or added, then the Server merely updates the 
MASTER CHOICE LISTS that are affected, then messages all processes on how to 
update their local copies of these CHOICE LISTS.

i.e. A CUSTOMER gets created and saved. The [Customer]Trigger method (running 
on the server) updates the associated VALUE / KEY arrays. Then it messages all 
processes with the update information, and so all processes on all clients make 
the same update into their local copies.

This works really slick, as even if a customer’s name was changed, this gets 
instantly reflected on all clients.

____

So this gives context to my question about storage (and if a client can access 
the storage on the server directly).

Thank you for all who answered. The 4D Community is great…



> On Sep 10, 2018, at 9:05 AM, Kirk Brooks via 4D_Tech <[email protected]> 
> wrote:
> 
> Chris,
> To expand on this a little bit, Storage consists of shared objects only.
> It's not possible to share objects between clients or a client and the
> server. Nor would you really want to. Nor would you want to attempt using
> something like Variable to Variable.
> 
> As Lutz points out you can read something in Storage on the server using an
> EOS method:
> 
> // myMethod
> 
> $0:=Storage.someKey
> 
> You could use the same approach to write to Storage but I would avoid this
> on the server. This is not what Storage is designed for. I think it would
> become very sluggish if you were using it extensively especially if you are
> also writing to it. If you need something like this in your app I would
> look for a different way to accomplish it. Personally I'd look at some sort
> of record based solution.
> 
> On Sun, Sep 9, 2018 at 11:20 PM Chris Belanger via 4D_Tech <
> [email protected]> wrote:
> 
>> I am intrigued by the storage object.
>> 
>> The documentation says that there will be a storage object for the server
>> and for each client.
>> 
>> But I have not been able to see an explanation of how you directly use
>> both.
>> 
>> So how are they differentiated in code?
>> 
>> — Thanks
>> **********************************************************************
>> 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]
>> **********************************************************************
> 
> 
> 
> -- 
> 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:[email protected]
> **********************************************************************

**********************************************************************
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