1 Reply Latest reply: Jul 9, 2012 4:22 PM by Jeff Desroches RSS

    fetching form fields, datatype and field length using .net API

    Aniket Gore

      Hi all,


      I need to fetch form fields using .net api. The values i require is fieldname, datatype and field length. I am new to API and the methods i could discover are GetAllFields and GetField but not sure which data type i can store the values in c#.


      If possible please help me with code sniplet.



        • 1. fetching form fields, datatype and field length using .net API
          Jeff Desroches

          Hi Aniket,


          You want to store the values in the Field data type that is provided in AR.  Here is a sample of the code:


          Hope this helps:




          Server svr = new Server();

          svr.Login( "<server>", "<username>", "<password");

          Field myField;

          myField = svr.GetField("<form>",111 );  // Get a specific field from a form




          Hashtable lstFields = new Hashtable();                   // Need to inclde the "using System.Collections;" at file header

          lstFields = svr.GetAllFields("HPD:Help Desk");      // Get all the fields in the Form


          foreach(Field field in lstFields) {                     // Loop through the collection