Community articleUFLGetChildren function
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


This function, along with UFLGetParent, is used to traverse vertically along the form hierarchy. UFLGetChildren returns the first child of the indicated node. If the node has no children, NULL is returned. All child nodes of a formNodeP can be traversed using a while loop in combination with UFLGetNext.


   formNodeP UFLGetChildren(
      formNodeP theParentNode


Table 1. Function parameters
theParentNodeformNodePThe formNodeP to retrieve its child from.


The formNodeP that represents the child or NULL if no child exists.


The following example uses UFLGetChildren in a while loop to vertically traverse down the form hierarchy until the last node on the branch is reached. The bottom node is returned.
   formNodeP getBottomNode(formNodeP *theNode)
   formNodeP theBottomNode = NULL;
   formNodeP theChild;
      if(*theNode != NULL)
         theChild = UFLGetChildren(*theNode);
      while (theChild != NULL)
         theBottomNode = theChild;
         theChild = UFLGetChildren(theChild);
      return theBottomNode;

Parent topic:
FormNodeP functions