Discussions

Expand all | Collapse all

Is there a recommended way of storing dynamic form data within a Quickbase table?

  • 1.  Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 10:55
    Hi there,

    I am working on a development project where we are looking to store form data submitted via a website into a Quickbase table. There will be multiple forms which share a set of pre-defined fields but will then have a set of 4 or 5 additional questions fields that vary from one another, for example:

    Form 1:
    First Name (text)
    Last Name (text)
    Email Address (email)
    Date of Birth (date)
    Which sports do you play out of the following? Rugby, Football, Cricket, Golf (multi-select)

    Form 2: 
    First Name (text)
    Last Name (text)
    Email Address (email)
    Date of Birth (date)
    How many days a month do you exercise? (number)

    We will not know what these questions are in advance as the client will be able to add these questions dynamically per page and so pre-defined columns aren't an option.

    We have managed to create a user token and successfully post data for the predefined fields via the api and store it in the table, however, we were wondering if there was a way to dynamically create new fields based on the data that is passed to the api, almost like a key value store, as opposed to having to predefine columns such as 'Question 1', 'Answer 1', Question 2', Answer 2'.

    Any help or suggested ways of handling the dynamic forms would be much appreciated.

    Kind regards,

    Nick


  • 2.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 12:15
    I suggest considering a Parent Child structure. The Children can either be all the questions or the additional questions, the child table for questions would have a field for the Question and another field for the Answer.


  • 3.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 13:02
    Thanks for your response. Are there any guides or tutorials on how to set up such as structure? I am new to Quickbase and so any further pointers would be appreciated.

    How would we link the questions and answers to the parent entry?

    Thanks


  • 4.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 13:19
    Here is some help on setting up a Relationship.
    https://help.quickbase.com/user-assistance/creating_a_relationship.html

    The website process would need to create a Parent record with header info like name or whatever is common to the survey questions.  If you are working with a web person, they can use an API to do that and it will respond with the [Record ID3] of the newly created Parent record.  Then the website process would need to create the child questions records and populate the field called [Related Parent] with the [Record ID#] of the newly created Parent.  


  • 5.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 13:56
    I've just been out for a walk and this popped into my mind, thanks very much for clarifying. I've already been playing about with the api and so will experiment further with this setup; your help is much appreciated.

    Is it relatively easy to pull through related data from one table to another whilst staying on the same screen in the Quickbase admin?


  • 6.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 13:59
    It is extremely easy to bring down any look up fields from a parent down to child records. It is also extremely easy to summarize up and ate a numerical type data from child records up to parents.

    Once you have set up a relationship there are buttons to do either one of those set ups.


  • 7.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 14:01
    Thank you, I'll have a play about and let you know how I get on. Thanks for the pointers.


  • 8.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 15:58
    That appears to have worked extremely well and is just what I was looking for, so thanks for that. The next step I guess is finding the best way to add multiple records to the api in one call? Is this possible? So, for example, one registration may have 10 records that need adding in the questions table. Do you have any examples or experience of this?


  • 9.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 16:09
    >... add multiple records to the api in one call? 

    API_ImportFromCSV


  • 10.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 17:08
    Yes, I agree with Dan.  The API guide is here for your web person.

    https://help.quickbase.com/user-assistance/apicalls.html


  • 11.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 17:19
    What is a "web person"? Does a "web person" need mad skills as demonstrated below?

    http://webperson.com/


  • 12.  RE: Is there a recommended way of storing dynamic form data within a Quickbase table?

    Posted 11-01-2018 20:36
    In my head I was saying "web guy", but I thought that would be a sexist assumption so I was trying to be PC .