On Aug 2, 2018, at 9:12 AM, Richard Wright wrote:
> I just ran into a problem where running a Query By Formula bug in
> Client/Server that has apparently been around for a long time:
>
> Client/Server
> Two related tables and automatic many-to-one is turned on
>
> 1. Select a record in the One table
> 2. Run a standard query to get the related records in the Many table
> 3. Run Query Selection By Formula on the Many table where the formula uses
> nothing from the One table at all
>
> The current record and entire selection of the One table is lost. You don’t
> even need step 2. Just run Query By Formula on the Many table. Even though
> the formula has nothing in it that touches the One table, the One table’s
> selection is cleared. It works fine in standalone.
>
> I discovered this in v16 R2 but it’s also a problem in v13.5. Has anyone else
> seen this problem?
Hi Rich,
I have seen this too. It’s a bug or difference in how single user and
client/server works. I hate when there is a difference like this. It’s hard to
track it down.
I remember getting bitten by this issues some years ago and could not reproduce
the problem. Always testing in single user developer mode. Lesson learned from
this. Gotta do testing in client/server mode to make sure things work exactly
like they do when you are testing in development.
In most cases the “environment” is the same for a process in single-user and
client/server. But sometimes it’s not. I guess this is an example of how
executing on the server the “environment" is not exactly the same.
What throws you off is if you do “execute on server” for a method and use
pointers as parameters, 4D is kind enough to transfer the pointer values to the
server “environment” for you so that it still works.
The quirks and gotchas of the 4D world.
Tim
Tim Nevels
[email protected] <mailto:[email protected]>
Innovative Solutions
785-749-3444
**********************************************************************
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]
**********************************************************************