Actions

SGQA identifier/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "=配列(テキスト)または配列(数字)の識別子=")
(Created page with "二次元配列の問題なので、配列内の回答を識別する必要かあります。Xを挟まずに行のサブ質問コードを追加し、その後にアンダー...")
Line 43: Line 43:
=配列(テキスト)または配列(数字)の識別子=
=配列(テキスト)または配列(数字)の識別子=


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'
二次元配列の問題なので、配列内の回答を識別する必要かあります。Xを挟まずに行のサブ質問コードを追加し、その後にアンダースコア文字を追加し、最後に列を識別するサブ質問コードを追加します。たとえば、アンケートのIDが1、グループのIDが6、質問のIDが12だとします。サブ質問回答のコードが'ber1'で、列のサブ質問回答のコードが'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:

Revision as of 01:19, 26 July 2018

注意: SGQA識別子およびINSERTANS:コードは、バージョン4.x以降で非推奨になります。代わりに、式マネージャー互換の質問コードを使用してください。ここにその命名規則に関する情報があります。
ヒント: このページでは、SGQA識別子を見つける方法について説明します。使用方法については、質問の追加ページを参照してください。

概要

SGQA(アンケート/グループ/質問/回答)識別子は、質問の回答にアクセスするためのショートカットです。作成したすべてのアンケート、グループ、質問には、データベースに割り当てられた固有の番号が割り当てられます。この番号は、管理インターフェースで、アンケート、グループ、質問バーのタイトルで確認できます。

SGQA識別子を決定するには、これらの数字を文字'X'の間に入れなければなりません。

注意: 常に大文字を使用してください("x"ではなく"X")。

エディターを使ってプレースホルダーを追加する

統合エディターには、質問のプレースホルダーを選択する機能があります。このアイコンは"LimeSurvey置換フィールドプロパティ"と呼びます。この機能では、先行するアンケートページの質問のみが表示されるため、アンケートモードによって挙動が異なります。

単一選択質問の識別子

例: アンケートのIDが1、グループのIDが6、質問のIDが12だとします。単一選択質問の識別子は次のようになります。

1X6X12

複数選択質問の識別子

複数選択式の質問なので、回答の選択肢も識別する必要があります。その選択肢のコードをXを挟まずに追加するだけです。たとえば、アンケートのIDが1、グループのIDが6、質問のIDが12だとします。回答の選択肢のコードが'ber1'だとします。

複数選択質問の回答選択肢の識別子は次のようになります。

1X6X12ber1

配列質問タイプの識別子

配列型の質問であるため、配列内のサブ質問も識別する必要があります。例えば、アンケートのIDが1、グループのIDが6、質問のIDが12だとします。サブ質問回答のコードが'ber1'だとします。この"配列"質問の回答の識別子は次のようになります。

1X6X12ber1

配列(テキスト)または配列(数字)の識別子

二次元配列の問題なので、配列内の回答を識別する必要かあります。Xを挟まずに行のサブ質問コードを追加し、その後にアンダースコア文字を追加し、最後に列を識別するサブ質問コードを追加します。たとえば、アンケートのIDが1、グループのIDが6、質問のIDが12だとします。サブ質問回答のコードが'ber1'で、列のサブ質問回答のコードが'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 to previously saved questions into the question text of later questions. (See Information from previous answers)

It can also be used in the query URL of a survey to "prefill" answers to a survey. eg: 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, ex: 3583X84X249