NetTalk Central

Author Topic: Include/Hide columns on NetWebForm  (Read 2837 times)

Johan van Zyl

  • Full Member
  • ***
  • Posts: 180
  • jvz
    • View Profile
    • Email
Include/Hide columns on NetWebForm
« on: April 12, 2011, 12:08:50 PM »
I have a Drop for TaskType - depending on which TastType was selected the Form must Include or Hide certain columns.
Sometimes a column is tied to 2 or more TaskTypes

This does not work - it only obeys for the 1st TaskType
Include (p_web.GetSessionValue('LOG:TaskType')='RequestForStaff' or p_web.GetSessionValue('LOG:TaskType')='Registration')
Hide (p_web.GetSessionValue('LOG:TaskType')<>'RequestForStaff'  p_web.GetSessionValue('LOG:TaskType')<>'Registration')

Please how do I get this to work?

ALSO

After choosing a TaskType - how can I immediately Include or Hide the appropriate columns without 1st having to Save record and then Change?

Thanks


Johan van Zyl
Clarion 6.3 9058/C8 Gold/SQL/NetTalk WebServer

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Include/Hide columns on NetWebForm
« Reply #1 on: April 12, 2011, 06:37:42 PM »
Hi Johan,

Include and Hide are quite different settings.

If a field is not included, it is not there. It cannot be hidden, or unhidden later. So use this setting when you're deciding what fields to include, or exclude from the form.

The Hide setting is dynamic - the fields are there, just not visible. They can be toggled on and off during the life of the form.

So for a field which is only visible when taskType is 'Registration' or 'RequestForStaff, the HIDE condition would be;
(p_web.GetSessionValue('LOG:TaskType')<>'RequestForStaff'  AND p_web.GetSessionValue('LOG:TaskType')<>'Registration')
Note that this is a case-sensitive comparison, so be careful with the possible values of TaskType.

On the TaskType field, Client-Side tab, in the reset list, add this dependent field to the list.

cheers
Bruce