Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Frederik Raabye 72 posts 276 karma points MVP 2x c-trib
    Jun 02, 2015 @ 08:20
    Frederik Raabye
    0

    Export data from multilingual form in Umbraco Forms

    I created a multilingual form using Umbraco Forms 4.1.3 for a survey and I am able to translate each question and corresponding answer using dictionaries like this:

    #Question 1 (da-dk: "Spørgsmål 1", en-us: "Question 1")
    #Option 1 (da-dk: "Svar 1", en-us: "Answer 1")
    #Option 2 (da-dk: "Svar 2", en-us: "Answer 2")
    

    I found that when collecting survey answers they are a mix of actual translated values of the options like this: (Pseudo csv output)

    #Question1,#Question2 <- Header row
    Svar 1, ... <- Survey answered on Danish language site
    Answer 1, ... <- Survey answered on English language site
    

    However, I would like to export analyze the data for both languages together and the mixed language data complicates this a bit.

    Is it possible to somehow store the key of the KVP intead of the translated value? (Or perhaps store a numerical answer value instead.)

    Any hints are highly appreciated.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 03, 2015 @ 12:59
    Tim
    0

    Hiya,

    I don't think you can access that information via the XML part of the API as that doesn't output the keys, however, the information that you're after should be in the database, you might just have to query that instead.

  • Frederik Raabye 72 posts 276 karma points MVP 2x c-trib
    Jun 03, 2015 @ 13:11
    Frederik Raabye
    0

    Thanks Tim. I was hoping for an undocumented feature. I haven't found a schema for the db.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 03, 2015 @ 15:07
    Tim
    100

    You could use the RecordsViewer to loop through the records? It hits the database though, and it can be quite slow if you have a lot of records, but that should allow you to get the keys. There's documentation for this in the Contour Developer docs.

    :)

  • Frederik Raabye 72 posts 276 karma points MVP 2x c-trib
    Jun 03, 2015 @ 15:28
    Frederik Raabye
    0

    Thanks I found it in the mean time!:)

Please Sign in or register to post replies

Write your reply to:

Draft