Thanks the Subform is working. As I worked on it I tested several things to see 
how 4D is doing the communication. Always what I find I have to do to 
understand the documentation and to fill in holes in it.

I will watch your Summit presentation too! I like frameworks as they make our 
code much more portable. As you said in the start of your presentation, it was 
good to see that in v17 4D is doubling down on Subforms. So I had better get on 
board.

The solution is much more elegant than opening another window on the client’s 
small screens.

Thanks again for taking the time to educate me.

Sincerely

Jody Bevan
> On May 30, 2018, at 11:57 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Jody,
> 
> On Wed, May 30, 2018 at 10:39 AM Jody Bevan via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> 1. How can the parent form know that a change was made in the Subform
>> Detail form (which is information from another table) so that it will save
>> the record? Ideally I will be able to determine what changes were made in
>> each field.
>> 
> 
> ​Code in the subform executes CALL SUBFORM CONTAINER($myEvent)​
> ​$myEvent is a custom event number. It can be anything. If you just want to
> know about basic events from the subform you can pass
> 
> Form event*-1​
> 
> ​It's a good, but not required, idea to send the inverse of the Form event
> to avoid confusion. Or you can make up your own numbers. Don't go crazy
> with this - you probably only need one or two.
> 
> Back on the parent form the subform object receives this and you can read
> it with the Form event function. Here's the thing - this form event fires
> on the subform no matter what. So you don't need to enable the subform for
> anything for this form event to fire there. In fact I pretty rarely use any
> of the parent level form events on my subforms.
> 
> However, if you are manipulating data in another table in the subform I'd
> encourage you to manage the saving of that record in the subform code. The
> idea being to encapsulate the subform operations within themselves.
> 
> Remember that the subform maintains its own memory space for local vars (so
> $myVar on the parent isn't seen by subform methods and vice versa).
> Subforms also have their own name space, so an object named "form_title"
> can exist on the parent form and the subform with no conflict.
> 
> HTH
> -- 
> Kirk Brooks
> San Francisco, CA
> =======================
> 
> *We go vote - they go home*
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to