Re: Audit File Updates via Triggers...

2018-11-21 Thread Kirk Brooks via 4D_Tech
On Wed, Nov 21, 2018 at 12:35 PM Benedict, Tom via 4D_Tech < 4d_tech@lists.4d.com> wrote: > If you live on an island where the only language is 4D, objects offer > some advantages. But if there's ever the chance that you'd like to > communicate with the outside world the lingua franca of rows

Re: Audit File Updates via Triggers...

2018-11-21 Thread Benedict, Tom via 4D_Tech
Kirk Brooks writes: >John, >Sure you can - you make a method to extract the data >you want. In selection based listboxes you can put the >method in a column formula. >On Tue, Nov 20, 2018 at 1:14 PM John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote: >> Just note that you won't be able to see

Re: Audit File Updates via Triggers...

2018-11-20 Thread Kirk Brooks via 4D_Tech
John, Sure you can - you make a method to extract the data you want. In selection based listboxes you can put the method in a column formula. It's definitely easier in v17 but I've been using this in v15 for a long time. On Tue, Nov 20, 2018 at 1:14 PM John DeSoi via 4D_Tech

Re: Audit File Updates via Triggers...

2018-11-20 Thread cjmiller--- via 4D_Tech
As always sql does not see object fields. So if you use sql to move data around. Sent from my iPhone > On Nov 20, 2018, at 3:56 PM, Robert ListMail via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > Wow, you guys are the best—GREAT idea! I think we all need to use objects > more often and this

Re: Audit File Updates via Triggers...

2018-11-20 Thread John DeSoi via 4D_Tech
Just note that you won't be able to see any of the data in an object field if you are displaying records in a list box. Some possible options now in version 17 if you are using collections/entity selections. John DeSoi, Ph.D. > On Nov 20, 2018, at 2:56 PM, Robert ListMail via 4D_Tech >

Re: Audit File Updates via Triggers...

2018-11-20 Thread Chip Scheide via 4D_Tech
Kirk, since I don't have objects yet... Trigger actions - 1 method tracking actions (including created and modified) - 4 methods On Tue, 20 Nov 2018 12:48:01 -0800, Kirk Brooks via 4D_Tech wrote: > Robert, > My thoughts on the created by/modified by stuff: > > 1) I moved all this to a single

Re: Audit File Updates via Triggers...

2018-11-20 Thread Robert ListMail via 4D_Tech
Wow, you guys are the best—GREAT idea! I think we all need to use objects more often and this is a great example—thanks Kirk. > On Nov 20, 2018, at 2:48 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > Robert, > My thoughts on the created by/modified by stuff: > 1) I moved all this

Re: Audit File Updates via Triggers...

2018-11-20 Thread Kirk Brooks via 4D_Tech
Robert, My thoughts on the created by/modified by stuff: 1) I moved all this to a single object field. I call it '_meta' and it's on every table I want to manage. 2) At a minimum the field has: {"created"; {"name: "", "date": ""}, "modified"; {"name": "", "date": ""}} 3) I wrote a few (I

Re: Audit File Updates via Triggers...

2018-11-20 Thread Chip Scheide via 4D_Tech
I use 2 fields (nearly) every table, some linking (many to many) tables do not have this. [Table]Created_Who [text] [Table]Modifed_Who [text] both fields track the same info Current User, Date, time (in that order and that format) This info is updated, most often by a trigger, using the

Re: Audit File Updates via Triggers...

2018-11-20 Thread Robert ListMail via 4D_Tech
Hi Chuck, I think in this case, this makes sense. I never thought about tracking all record updates or going further… all updates on chosen fields. I recall in the past that other developers that cared about such things had a 3-4 fields added to each record and could easily see who created and

Re: Audit File Updates via Triggers...

2018-11-20 Thread Charles Miller via 4D_Tech
I think the strategy depends upon need. If all you need to to know who created, data and time created and last modified by, last modified date and time, then I would add fields to table in question. If you have a need to track who made every modification, I would put that in a sperate table. You

Audit File Updates via Triggers...

2018-11-20 Thread Robert ListMail via 4D_Tech
At a minimum, I just have the simple need of recording “CreatedBy” and “ModifiedBy” values (username or ID) for one particular table. I do have extra fields already in that table that could be repurposed and I would probably add “DateModified” to that. However, that’s three fields used just