Community articleUFLRemoveEnclosure function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This function will either remove an enclosure from a specific datagroup or delete the enclosure from the form.

Function

   r_short UFLRemoveEnclosure(
      formNodeP aNode,
      r_charP theDataGroup
   );


Parameters

Table 1. Function parameters
ExpressionTypeDescription
aNode formNodePThe item formNodeP that contains the enclosure to remove.
theDataGroupr_charPThe datagroup that contains the enclosed item. If NULL, the item will be removed from all datagroups. If an item no longer belongs to any datagroups, it is deleted from the form.


Returns

OK on success or an error code on failure.

Example

The following example uses UFLDereferenceEx to locate a specific data node. UFLRemoveEnclosure is then used to remove the node from the form.
   r_error deleteLogo(formNodeP form)
   {
   formNodeP tempNode=NULL;
   r_error error=OK;
      
      if ((tempNode = UFLDereferenceEx(form, NULL, "PAGE1.LOGODATA", 0,
         UFL_ITEM_REFERENCE, NULL)== NULL)
      {
         fprintf(stderr, "Could not locate LOGODATA node.\n");
         return(NOTOK);
      }
      error = UFLRemoveEnclosure(tempNode, NULL);
      if (error != OK)
      {
         fprint(stderr, "UFLRemoveEnclosure error %hd.\n);
         return(NOTOK);
      }
      return(OK);
   }


Parent topic:
FormNodeP functions