Re: Restricting a query

2017-08-01 Thread Nigel Greenlee via 4D_Tech
Jarosz Actually you don’t need to build your own query editor. All you actually need to do is make sure you wrap any calls to the query editor(and to any query in general) so you can apply to any query a client filter > On 31 Jul 2017, at 19:38, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>

Re: Restricting a query

2017-08-01 Thread jarosz via 4D_Tech
Many thanks Chip This is a really simple solution and works like a dream! Regards Michael Jarosz -- View this message in context: http://4d.1045681.n5.nabble.com/Restricting-a-query-tp5753437p5753463.html Sent from the 4D Tech mailing list archive at Nabble.com.

Re: Restricting a query

2017-07-31 Thread bob.miller--- via 4D_Tech
RE> I have a table which contains records for 10 different clients. I'd like to give a client the ability to search the table for only his records and not be able to see any of the other clients' records. Is it possible to do this using the standard 4D Query editor by always applying an additional

Re: Restricting a query

2017-07-31 Thread Chip Scheide via 4D_Tech
You can also filter BEFORE query. for simplicity: Query([table];[table]client_ID = $Current_Client_ID) Query selection([table]) This will open 4D's query editor, and apply the query the user does to the selection you created before hand. On Mon, 31 Jul 2017 11:34:12 -0700 (MST), jarosz via 4D_Te

Re: Restricting a query

2017-07-31 Thread David Adams via 4D_Tech
I'll take it as read that you have a solid reason for commingling the data from your various clients. Something I've seen and like too is along the lines of Filter_AfterSearch(->[Table]) So, after *any* search, you run a filter against the table. This can be used for all sorts of things: -- Excl

Re: Restricting a query

2017-07-31 Thread Kirk Brooks via 4D_Tech
Jarosz, For that you'll want to build your own query editor. To achieve that sort of separation of data you'll need to be careful that all queries and selections created by relations are segregated by client. On Mon, Jul 31, 2017 at 11:34 AM, jarosz via 4D_Tech <4d_tech@lists.4d.com> wrote: > I h

Re: Restricting a query

2017-07-31 Thread Chuck Miller via 4D_Tech
Not sure if views work with normal query but I would start there. Regards Chuck Sent from my iPhone > On Jul 31, 2017, at 2:34 PM, jarosz via 4D_Tech <4d_tech@lists.4d.com> wrote: > > I have a table which contains records for 10 different clients. > I'd like to give a client the ability to se