NetTalk Central

Author Topic: Questions re the use of multiple forms from the same browse  (Read 2994 times)

Jim A

  • Full Member
  • ***
  • Posts: 203
    • View Profile
    • Email
Questions re the use of multiple forms from the same browse
« on: April 03, 2013, 03:34:56 PM »
Hi All:  I have a parent Inventory File that is linked to one of 4 possible child files.  Each child file has different specifications.  For example: Auto, Truck, Motorcyle, Misc.  In my desktop app, I hide and unhide tabs according to the child file.  The child record is fetched and updated manually. 

I have the same working in the web app.  My question here: is it better to simply use a different form for each type of child record? 

I am hiding and unhiding tabs here, as well, and am handling the fetch and update, etc.  It appears that all of the form's fields are being sent to the server (and probably should be) even though most don't apply.  Would it be faster to break this into separate forms?  If so, what do I need to send to the form and where does the code need to go?

Many thanks.

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Questions re the use of multiple forms from the same browse
« Reply #1 on: April 04, 2013, 09:37:04 AM »
not sure whats best for you, better is sometimes in the eye of the beholder.

but i tend to use hide in nettalk webforms only when i expect to flip it it dynamically.
as hidden stuff gets sent back and forth to the browser,

Conditionally Included stuff only gets sent if you need it.

so if you have a motorcycle tab and and a truck tab
you could use  tab Conditions, for example:
p_web.gsv('my:rectype') = 'Truck'   on the Truck tab
p_web.gsv('my:rectype') = 'Motorcycle'   on the Motorcycle tab

then only one or the other is sent to the browser. never both.

if you requirements get complex, (like with separate tables for each form)
i like the idea of separate updateforms. 

I suspect you are using hide because on an insert you do not know the what is needed? You would have the same issue
with multiple updateforms. (so: try and do something like 'Add a truck'  instead of  a generic  'Insert' so your updateform knows what to do
when its first generated)

poul

Jim A

  • Full Member
  • ***
  • Posts: 203
    • View Profile
    • Email
Re: Questions re the use of multiple forms from the same browse
« Reply #2 on: April 04, 2013, 09:43:38 AM »
Hi Poul: Thanks for your response.  I do have separate tables -- as the specifications are different between inventory types.  I will look at splitting into different forms.

Best.