Community articleUFLIsSigned 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 determines whether a node is signed.


   r_error UFLIsSigned(
      formNodeP theFormNode, 
      r_boolean excludeSelf, 
      r_boolean *theStatus


Table 1. Function parameters
theFormNode formNodePAny form node.
excludeSelfr_booleanA signature node is always self-signed. To determine whether a second signature has been applied to that node, you must exclude the self-signing from this check.
To exclude the self-signing from the signature check, set this to OK. To include the self-signing, set this to NOTOK.
theStatus r_boolean*A pointer that will contain the node's status. OK indicates that it is signed, NOTOK indicates that it is not signed.


OK on success or an error code on failure.


The following function locates the value node for a Date field, checks to see if it is signed, and sets the value if the node is not signed.
   r_error setDateValue(r_charP date, formNodeP theForm);
   formNodeP tempNode;
   r_boolean theStatus;
      /* Locate the value option for the Date field */
      if ((tempNode = UFLDereferenceEx(theForm, NULL,
         "PAGE1.Date.value", 0, UFL_OPTION_REFERENCE, NULL))
         == NULL)
         fprintf(stderr, "Could not locate value node for Date.\n");
      /* Check the value node to see if it is signed. */
      if (UFLIsSigned(tempNode, NOTOK, &theStatus) != OK)
            "Could not determine whether Date's value is signed.\n");
      /* If the value node is signed, return an error. Otherwise, set it to
         the value passed into the function. */
      if (theStatus == OK)
         fprintf(stderr, "Date's value is signed.\n");
         if (UFLSetLiteralEx(tempNode, NULL, date) != OK)
            fprintf(stderr, "Could not set literal for Date.\n");

Parent topic:
FormNodeP functions