Show or hide one or more "groups" on a O4W Form-wizard designed form (Web)

Show or hide one or more "groups" on a O4W Form-wizard designed form

On an O4W Form-wizard designed form, you might occasionally wish to programmatically show or hide one or more "groups" that you've defined in form definition process (for example, certain groups might contain information that's not appropriate or relevant for the current record).  You can use the commuter module and O4WQualifyEvent to achieve this.

In order to implement this functionality, you must know the name of at least one field that's defined in the group.  Then, using the commuterutility and that field name, we can find the section that contains the group that this field belongs in, and then show or hide the entire section, as appropriate.

* put this in the "post draw" event in the commuter module

* get a "handle" to the group that this element is part of – for example, let's pretend that the field is named REPORTS_TO, and we want to hide the entire group that contains REPORTS_TO

sectionExample = O4WCommuterUtility("", O4WUTILITY_SECTIONNAME$, "REPORTS_TO")

if sectionExample <> "" then

                if bHideSection = "1" then

                                O4WQualifyEvent("", "hide", sectionExample) ;* we use "" in the first parameter to tell the qualify event we want the hide to take effect immediately

                End else

                                O4WQualifyEvent("", "show", sectionExample) ;* we use "" in the first parameter to tell the qualify event we want the show to take effect immediately

                End

End

  • kb/kb_articles/kb1023.txt
  • Last modified: 2024/01/30 13:36
  • by 127.0.0.1