SGQA identifier/it: Difference between revisions
From LimeSurvey Manual
Maren.fritz (talk | contribs) (Created page with "Ad esempio: il sondaggio ha ID 1, il gruppo ha ID 6, la domanda ha ID 12. Il tuo identificatore per una domanda a scelta singola sarebbe simile a questo:") |
Maren.fritz (talk | contribs) (Created page with "=Identificativo per domande a scelta multipla=") |
||
Line 43: | Line 43: | ||
= | =Identificativo per domande a scelta multipla= | ||
Revision as of 07:52, 27 July 2023
Descrizione Generale
L'identificatore SGQA (Survey/Group/Domanda/Risposta) è una scorciatoia per la risposta a una domanda. A ogni sondaggio, gruppo e domanda che stai creando viene assegnato un numero univoco nel tuo database. Puoi vedere questo numero nell'interfaccia di amministrazione nel titolo del sondaggio, nel gruppo e nella barra delle domande (ad esempio, vedi la colonna "id domanda" di seguito)
Per determinare l'identificatore SGQA, devi mettere i numeri del sondaggio, del gruppo e della domanda insieme alla lettera "X" nel mezzo. Ad esempio, un SGQA dovrebbe assomigliare a questo: "745X35X5".
Usa editor per aggiungere segnaposto
L'editor integrato ha una funzione per selezionare il segnaposto per una determinata domanda. L'icona si chiama "Campi di posizionamento". Questa funzione elenca sempre solo le domande delle pagine del sondaggio precedente, quindi dipende dalla modalità del sondaggio.
Identificativo per domande a scelta singola
Ad esempio: il sondaggio ha ID 1, il gruppo ha ID 6, la domanda ha ID 12. Il tuo identificatore per una domanda a scelta singola sarebbe simile a questo:
1X6X12
Identificativo per domande a scelta multipla
Since it is a multiple choice question the particular answer must be identified too. Just add the code of that answer without an X. For example: Survey has ID 1, Group has ID 6, Question has ID 12. The particular answer has code 'ber1'.
Your identifier for this multiple choice question answer would look like this:
1X6X12ber1
Identifier for Array question types
Since it is a array question, the particular subquestion within the cell must be identified too. Add the subquestion code of the row without an X. For example: Survey has ID 1, Group has ID 6, Question has ID 12. The particular subquestion has code 'ber1'. Your identifier for this "Array" question answer would look like this:
1X6X12ber1
Identifier for Array (Text) or Array (Number) Questions
Since it is a combined array question, the particular answer within the cell must be identified too. Add the subquestion code of the row without an X, then append the underscore char and finally add the subquestion code that indentifies the column. For example: Survey has ID 1, Group has ID 6, Question has ID 12. The particular subquestion has code 'ber1', and the column is identified by the subquestion with code 'lab1'
Your identifier for this "Array (Text)" question answer would look like this:
1X6X12ber1_lab1
Uses of the SGQA identifier
The SGQA identifier can be used to load the answers of previously saved questions into the question text of later questions (for a short guide, see the introduction wiki section on questions).
It can also be used in the query URL of a survey to "prefill" answers to a survey. E.g., for SGQA 1X6X121ab1, your query URL could include "&1X6X121ab1=Y" to prefill that answer with a "Y". (See Prefilling survey answers using the survey URL)
The SGQA identifier is also the field name where the data for each question is stored in the database/survey responses table.
Dynamically reference the SGQ identifier
Some people may find a need to reference a question dynamically. For instance, if you would like to hide the input text field of a short text answer. You can now do this (as of SVN build 9755) by using the {SGQ} identifier. LimeSurvey will replace the {SGQ} with the full ID of that question, e.g., 3583X84X249