home | products | customer | support | forums | contact
Sign in | Join |
in
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-31-2010 9:45

    Get survey data using SDK

    Hi,

    I need to get the feedback server survey data into my .Net application(in whichever format possible i.e. XML, CSV or JSON).

    Specifically i need to extract the questions and answers submitted by all the survey takers for that questions using SDK 4.4.

    Could you please let me know the steps involved in doing this?

    Thanks

    Alpesh

  • 09-09-2010 4:09 In reply to

    • Tom
    • Top 10 Contributor
    • Joined on 05-19-2007
    • Switzerland
    • Data Illusion

    Re: Get survey data using SDK

     Hi,

    well the easiest would be to use the api data export features for csv where you can customize your template and then request a csv string :

    default values for the columsnheadertemplate etc.. can be found in the FS administration section Data Export screen.

                 DataExportTemplateCSVData csvTemplates = new DataExportTemplateCSVData();
                DataExportTemplateCSVData.DataExportTemplateCSVRow csvTemplate = csvTemplates.
                    DataExportTemplateCSV.NewDataExportTemplateCSVRow();

                csvTemplate.DataExportTemplateId = -1;
                csvTemplate.CSVOutputTypeId = CSVExportOutput.SingleAnswers;
                csvTemplate.ColumnsHeaderTemplate = ;
                csvTemplate.ColumnHeaderOutputId = CSVExportColumnHeaderOutput.Text;
                csvTemplate.AnswerSelectionMark = "1";
                csvTemplate.AnswerUnselectedMark = "0";
                csvTemplate.FieldDelimiterTypeId = (int)CSVExportFieldDelimiter.Comma;
                csvTemplate.FieldDelimiter = "";
                csvTemplate.TextDelimiter = "";
                csvTemplate.ReplaceCRTypeId = (int)CSVExportCarriageReturnType.KeepCR;
                csvTemplate.ReplaceCRCustomChar = "";
                csvTemplate.SelectedAnswersOutputId = (int)CSVExportSelectionAnswersOutput.AnswerText;
                csvTemplate.RespondentTextAnswersOutputId = (int)CSVExportRespondentTextOutput.AnswerText;
                csvTemplate.ExportAnswersTypeId = int.Parse(ExportAnswerTypesDropDownList.SelectedValue);
                csvTemplate.MultipleColumnAnswersTypeId = (int)CSVExportMultipleAnswers.Separated;
                csvTemplate.MultipleColumnSeparator = "";
                csvTemplates.DataExportTemplateCSV.AddDataExportTemplateCSVRow(csvTemplate);
               
                string csvExport = null;

                csvExport = new Export().ExportCSVSingleAnswers(csvTemplates, dataExportTemplate);

               or if you want the other csv export mode use 

               csvExport = new Export().ExportIndivdualCSV(csvTemplates, dataExportTemplate);
               

  • 09-24-2010 16:01 In reply to

    Re: Get survey data using SDK

    Hi,

    Could you please let me know what should be the value of dataExportTemplate variable in the code?

    And also what should be the values in

    ExportAnswerTypesDropDownList ?  I am not using any drop down list on my page, it will just be an internal functionality with some static value, so could you please let me know what are the valid values for that dropdown?

     

  • 09-27-2010 10:41 In reply to

    • Tom
    • Top 10 Contributor
    • Joined on 05-19-2007
    • Switzerland
    • Data Illusion

    Re: Get survey data using SDK

    Hi,

    you may find all possible values in the user interface that is available from the FS administration section, report tab and then click on the add new template, this will take you the main export screen which has also all the default values or possible values that can be used for the export process.

Page 1 of 1 (4 items)
(c) 2008 Data Illusion. All Rights Reserved.