Actions

SGQA identifier/it: Difference between revisions

From LimeSurvey Manual

(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:")
(Created page with "=Identificativo per domande a scelta multipla=")
Line 43: Line 43:




=Identifier for Multiple Choice Questions=
=Identificativo per domande a scelta multipla=





Revision as of 07:52, 27 July 2023


Nota: identificatori SGQA e INSERTANS: codici non saranno più disponibili per l'uso in LimeSurvey 4 all'interno di espressioni. Utilizzare invece codici di domanda compatibili con ExpressionScript. Controlla il seguente link per le convenzioni di denominazione.


Suggerimento: Questa pagina descrive come trovare un identificatore SGQA. Per informazioni su come usarlo, fare riferimento alla pagina Aggiunta di una domanda.


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".


Nota: Usa sempre lettere maiuscole ("X" invece di "x")!


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)


For more details on URL fields, check the following wiki section.


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