NetTalk Central

Author Topic: Executing code when tab is changed  (Read 2816 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Executing code when tab is changed
« on: September 03, 2014, 08:42:42 PM »
I have a Form with two tabs - Booking and Services.  Services is a Child of Bookings (One to Many).

Hi

I have a 'Total Fee' field on the Booking tab that I want to update whenever anything that affects the Fee is changed.  For fields on the Booking tab that is straightforward utilising the Client Side code and Reset.  But what can I do about recalculating the Fee after a Service has been added (or changed)?

On the Services tab I have a Browse of the current associated Services and a Form. I can Insert, Change and Update the Services and when I reselect the Booking tab I want to automatically recalculate the Fee.

Thanks for any help.

Keith

Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Executing code when tab is changed
« Reply #1 on: September 03, 2014, 09:30:16 PM »
Add the TotalFee field to the Reset list of the Browse field.

ie the browse is a FormField right - so it has a client-side tab.
and on that tab you can reset any fields you like - so when the browse changes the dependent fields change as well.

cheers
Bruce