What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to get value out of JObject

    Asked by godish on August 08, 2013 at 11:18 AM

    Hi i was trying to get the values out of the JObject after making some query on form submition but i don't know how to do it so can you please help me on that.

    For example

                Dictionary<StringString> submissionFilter = new Dictionary<stringstring>();             submissionFilter.Add("id:gt""FORM ID");             submissionFilter.Add("created_at:gt""DATE");            var submissions = client.getSubmissions(0, 0, submissionFilter, ""); the submissions is holding the JObject and need to get value store for "first" i.e is first name in my form so How can i do it ? I try it doing multiple different way like JObject obj = JObject.Parse(JsonConvert.ToString(submissions));
    but none looks to work so can you please help me on this

    I am uploading my JObject screen shot too

    thanks
    Screenshot
    Submissions style size name
  • Profile Image

    Answered by jeanettebmz on August 08, 2013 at 01:08 PM

    You sound like a JotForm API beta tester.. If that is the case, let me tell you the Support Forum Staff is not trained on this.

    I would like you to explain better what is exactly what you are trying to accomplish to. And I will escalate your request to our 2nd level engineers

  • Profile Image

    Answered by godish on August 08, 2013 at 04:16 PM

    Hi thanks for reply

     Actually i am trying to get the data from the forms from your server and trying to populate on my internal server database so i need some help on that Can you please ask 2nd level engineers to look at my problem 

          I have one more question is there a way to connect to your server directly and get form submissions directly from there or API is the only way to get data.

          and also i was trying to use the C# Api to get forms where form_id = "some form no" and along the way applying filter where flag = "1" and dateCreate = today 

    so how could i do that

    thanks

  • Profile Image
    JotForm Support

    Answered by Mike_T on August 08, 2013 at 05:23 PM

    Actually i am trying to get the data from the forms from your server and trying to populate on my internal server database so i need some help on that Can you please ask 2nd level engineers to look at my problem

    According to the screenshot, you are getting the right output in JSON format. Would you like to convert it to XML or do something else?

    Anyway, we would like to suggest contacting our API Team. In order to get in touch with them, please kindly submit a form at the bottom of the API Docs page.

    http://api.jotform.com/docs/#contact 

    I have one more question is there a way to connect to your server directly and get form submissions directly from there or API is the only way to get data.

    We do not provide direct access to the database, but you can use other methods to get the data manually, like downloading Excel/CSV reports.

    Also, it is possible to use webhooks, so that form can send the post data to your script on each submission.

    and also i was trying to use the C# Api to get forms where form_id = "some form no" and along the way applying filter where flag = "1" and dateCreate = today

    I am not familiar with C#, but I think it should be something similar to:

    submissionFilter.Add("id:gt", "YOUR FORM ID HERE");
    submissionFilter.Add("created_at:gt", " 2013-08-08 00:00:00 ");
    var submissions = client.getSubmissions(0, 0, submissionFilter, "");

    Please provide our API Team with your full script, I think that they will be able to help you with this much faster.

    Thank you for using our service.

  • Profile Image

    Answered by godish on August 09, 2013 at 05:56 PM

    Hi thanks for the reply now i am stuck in one more problem when i am trying to update the submission flag value to 1 it gave me the error 400 which says bad request.

     

    Dictionary newSubmission = new Dictionary(); newSubmission.Add("flag", "1"); var result = jotformAPIClient.editSubmission(241793866341335623, newSubmission);

    but it gave the error on HttpWebResponse and the error code was 400 so i don't know what is wrong with this query

    so what is wrong with this process.

  • Profile Image
    JotForm Support

    Answered by EltonCris on August 09, 2013 at 09:33 PM

    @godish

    I am not quite familiar with C# so it's best to address this question to our dev team using the following contact form as stated by my colleague on the previous message. http://api.jotform.com/docs/#contact 

    Let me also add that since your code involves altering submissions, make sure your API has Full Access permission. Note sure if this helps but I think you may need it for modifying data.

    Also the format is this:

    var jotformAPIClient = new JotForm.APIClient("YOUR API CODE");

    Dictionary newSubmission = new Dictionary();

    newSubmission.Add("1_first", "FIRST NAME");

    newSubmission.Add("new", "0");

    newSubmission.Add("flag", "0");

    var result = jotformAPIClient.editSubmission("SUBMISSION ID", newSubmission);

    You did not define what specific field on the submitted data you're going to edit. Bold part.

    Kindly review. Thanks!

  • Profile Image

    Answered by godish on August 12, 2013 at 11:36 AM

    Hi thanks for the reply I had tried the same thing and before trying I did change the access level to all access but also for some reason it have me the error saying http 200 error

    I have no idea what is wrong on it so can you please brief me little further or give me the sample http request please 

    thanks

    shushil

  • Profile Image
    JotForm Support

    Answered by KadeJM on August 12, 2013 at 12:57 PM

    Hi Shushil, can you please share with us the scripting setup that you have for this so far. This way we can try to help you further with this to get it working for you.

  • Profile Image
    JotForm Support

    Answered by KadeJM on August 12, 2013 at 12:58 PM

    If it's the same as in your previous image in the beginning of this thread though then please let us know and disreguard my above response.