SGQA identifier/fr: Difference between revisions
From LimeSurvey Manual
m (Text replace - "à" to "à") |
(Updating to match new version of source page) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages /> __TOC__ | <languages /> __TOC__ | ||
<div class="simplebox">'''Hint:''' This page describes how you can find out an | <div class="mw-translate-fuzzy"> | ||
<div class="simplebox">Depuis la version 1.92, vous n'avez plus besoin d'utiliser les identifiants SGQA. A la place vous pouvez utiliser des codes de questions compatible avec [[Expression Manager|Expression Manager]]. Vous trouverez ici les informations concernant leur [[Expression Manager#Access to Variables|syntaxe]]</div> | |||
</div> | |||
<div class="simplebox">'''Hint:''' This page describes how you can find out an SGQA identifier. For information how to use it please refer to the page [[Adding a question]]. </div> | |||
===Description générale=== | ===Description générale=== | ||
L'identifiant SGQA (pour Survey/Group/Question/Answer en | |||
L'identifiant SGQA (pour Survey/Group/Question/Answer en français, Questionnaire/Groupe/Question/Réponse mais seule la notation anglaise est interprétée par LimeSurvey) est un raccourci vers une réponse à une question. Chaque questionnaire, chaque groupe et chaque question que vous créez se voit attribuer un code unique dans la base de données. Vous pouvez retrouver ces nombres (appelés aussi xID) dans l'écran d'administration dans les barres de titres de questionnaire, de groupe et de question. | |||
<center>[[File:SGQA.png]]</center> | <center>[[File:SGQA.png]]</center> | ||
Pour déterminer l'identifiant SGQA vous devez rassembler ces nombres en les séparant par la lettre "X". | Pour déterminer l'identifiant SGQA vous devez rassembler ces nombres en les séparant par la lettre "X". | ||
<div class="simplebox">'''Note:''' Always use capital letters ("X" instead of "x")!</div> | <div class="simplebox">'''Note:''' Always use capital letters ("X" instead of "x")!</div> | ||
=Use editor to add placeholder= | =Use editor to add placeholder= | ||
[[File:lime_replacement_editor.png]] | The integrated editor has a feature to select the placeholder for a certain question. The icon is called "Placement fields". This feature always lists questions of previous survey pages only, so it depends on the survey mode. | ||
<center>[[File:lime_replacement_editor.png]]</center> | |||
<center>[[File:Lime replacement editor window.png]]</center> | |||
===Identifiant pour une question à choix unique :=== | ===Identifiant pour une question à choix unique :=== | ||
Par exemple, le questionnaire a l'ID 1, le groupe a l'ID 6 et la question a l'ID 12. L'identifiant pour ce genre de question à choix unique doit ressembler à quelque chose comme ceci : | Par exemple, le questionnaire a l'ID 1, le groupe a l'ID 6 et la question a l'ID 12. L'identifiant pour ce genre de question à choix unique doit ressembler à quelque chose comme ceci : | ||
'''1X6X12''' | '''1X6X12''' | ||
===Identifiant pour une question à choix unique utilisant un jeu d'étiquettes=== | ===Identifiant pour une question à choix unique utilisant un jeu d'étiquettes=== | ||
L'identifiant ressemblera donc à | Puisque cela reste une question à choix unique qui utilise des étiquettes pour les réponses, cette réponse particulière doit elle-aussi être identifiée. Pour cela, ajoutez simplement le code de cette étiquette sans le "X". Par exemple, questionnaire d'ID 1, groupe d'ID 6, question d'ID 12. La réponse qui nous intéresse possède le code "lab1". | ||
L'identifiant ressemblera donc à ça~hs~: | |||
'''1X6X12lab1''' | '''1X6X12lab1''' | ||
===Identifiant pour une question à choix multiples=== | ===Identifiant pour une question à choix multiples=== | ||
Comme il s'agit d'une question à choix multiples, la réponse recherchée doit aussi être identifiée. Ajoutez simplement le code de cette réponse sans le "X". | |||
L'identifiant ressemblera donc | Par exemple, questionnaire d'ID 1, groupe dD 6, question d'ID 12. La réponse recherchée possède le code "ber1". | ||
L'identifiant ressemblera donc à ça~hs~: | |||
'''1X6X12ber1''' | '''1X6X12ber1''' | ||
=Identifier for Array (Text) or Array (Number) Questions= | =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' | |||
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: | Your identifier for this "Array (Text)" question answer would look like this: | ||
1X6X12ber1_lab1 | 1X6X12ber1_lab1 | ||
=Uses of the SGQA identifier= | =Uses of the SGQA identifier= | ||
It can also be used in the query URL of a survey to "prefill" answers to a survey. | 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 [[Questions_-_introduction#Information_from_previous_answers|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 [[Workarounds: Survey behaviour#Prefilling_survey_answers_using_the_survey_URL|Prefilling survey answers using the survey URL]]) | |||
{{Note|For more details on URL fields, check the following [[URL fields|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= | =Dynamically reference the SGQ identifier= | ||
Some people may find a need to reference a question dynamically. For instance, if you would like to [ | |||
Some people may find a need to reference a question dynamically. For instance, if you would like to [[Workarounds: Manipulating a survey at runtime using Javascript#General|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 |
Revision as of 16:30, 24 January 2019
Description générale
L'identifiant SGQA (pour Survey/Group/Question/Answer en français, Questionnaire/Groupe/Question/Réponse mais seule la notation anglaise est interprétée par LimeSurvey) est un raccourci vers une réponse à une question. Chaque questionnaire, chaque groupe et chaque question que vous créez se voit attribuer un code unique dans la base de données. Vous pouvez retrouver ces nombres (appelés aussi xID) dans l'écran d'administration dans les barres de titres de questionnaire, de groupe et de question.
Pour déterminer l'identifiant SGQA vous devez rassembler ces nombres en les séparant par la lettre "X".
Use editor to add placeholder
The integrated editor has a feature to select the placeholder for a certain question. The icon is called "Placement fields". This feature always lists questions of previous survey pages only, so it depends on the survey mode.
Identifiant pour une question à choix unique :
Par exemple, le questionnaire a l'ID 1, le groupe a l'ID 6 et la question a l'ID 12. L'identifiant pour ce genre de question à choix unique doit ressembler à quelque chose comme ceci :
1X6X12
Identifiant pour une question à choix unique utilisant un jeu d'étiquettes
Puisque cela reste une question à choix unique qui utilise des étiquettes pour les réponses, cette réponse particulière doit elle-aussi être identifiée. Pour cela, ajoutez simplement le code de cette étiquette sans le "X". Par exemple, questionnaire d'ID 1, groupe d'ID 6, question d'ID 12. La réponse qui nous intéresse possède le code "lab1".
L'identifiant ressemblera donc à ça~hs~:
1X6X12lab1
Identifiant pour une question à choix multiples
Comme il s'agit d'une question à choix multiples, la réponse recherchée doit aussi être identifiée. Ajoutez simplement le code de cette réponse sans le "X".
Par exemple, questionnaire d'ID 1, groupe dD 6, question d'ID 12. La réponse recherchée possède le code "ber1".
L'identifiant ressemblera donc à ça~hs~:
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