2 Replies Latest reply on Feb 9, 2018 3:59 AM by Ricardo Donner

    Problem updating by RequestId with joint Form C API

      Share This:





      i have a problem since Version 9.1 we cannot update of Requests with the C API because our RequestID / EntryID is now larger then 15 chars.
      We use a JointForm to update the request.




      In the ar.h there is a limitation to 15 Chars.

      #define AR_MAX_ENTRYID_SIZE       15/* max size of an entry id in the system */



      I was wondering because the java API does not have this limitation and we can update our requests.
      But we cannot use the java API in our environment.



      We are Using the API Version: arapi91_build001.dll




      Our RequestID has the following format: 0012884026|000000005646384


      Is this a Bug, or do i have a other way to Update a request?


      My Request example:

          AREntryIdList entryId;

          entryId.numItems = 1;

          entryId.entryIdList = (AREntryIdType *)win_calloc(entryId.numItems, sizeof(AREntryIdType));    
         strncpy_s(entryId.entryIdList[0], eId, AR_MAX_ENTRYID_SIZE);

          entryId.entryIdList[0][AR_MAX_ENTRYID_SIZE] = '\0';

          if ((ret = ARSetEntry(ctl, schema, &entryId, fieldValueList, 0, 0, status)) > AR_RETURN_WARNING)


              FreeAREntryIdList(&entryId, FALSE);

              return ret;


          FreeAREntryIdList(&entryId, FALSE);


      Error: Invalid entry in the entry id list.




      Thank you

        • 1. Re: Problem updating by RequestId with joint Form C API
          Mark Walters

          I'm sure someone with API experience will be along shortly but, looking at the docs, it appears you specify join form request IDs as multiple entryIDs in the AREntryIDList - one entry for each form making up the join.


          The system identifies entries in join schemas by concatenating the entry IDs from the member schemas. As a result, an entry ID can have one or more values of type AREntryIdType and, therefore, is represented by AREntryIdList.


          Also, I find the driver source code that's included with the server under the API directory a useful reference.  Here, for example, is the driver code for a SetEntry which may help?


          /* Get parameters */

            DriverPrintHeader("SET ENTRY");

            strcpy(schema, GetChar("Schema: ", ""));

            numItems = GetUnsignedInt("Number of Items in EntryId ? (1): ", 1);

            entryId.numItems = numItems;

            if (numItems == 0)

                entryId.entryIdList = NULL;


                entryId.entryIdList = (AREntryIdType *)

                                        malloc(numItems * sizeof(AREntryIdType));

            if (entryId.entryIdList == NULL)



                return AR_RETURN_ERROR;




            for (numItems = 0; numItems < entryId.numItems; numItems++)

                strcpy(entryId.entryIdList[numItems], GetChar("Entry Id: ", ""));

            DriverPrintPrompt("Field/value pairs to set:\n");


            getTime = GetARTimestamp("Time of Get operation (0): ", (ARTimestamp) 0);

            option = GetUnsignedInt("SetEntry option ? (0): ", 0);



            /* Call routine */


            result = ARSetEntry(GetControlStructPtr(), schema, &entryId, &fieldList,

                                getTime, option, &status);


          • 2. Re: Problem updating by RequestId with joint Form C API

            Hello Mark,


            great this was the problem, now i split the | to array and it works :-)


            Thank you for the fast support.