Questions

Purpose

The Questions data-table is a child entity which holds data for the actual questions that are asked by staff as part of a Questionnaire. It links to Questionnaires. 

The Questions data-table includes data-fields for the actual question and also fields for guidance that can be useful to help staff in how they should ask the question.

A full listing of all the fields in the data-table with their purposes and any automation built into the App is laid out below. To fully understand the purpose of the data-fields please read further in this topic.

How and where to access Questions data

The image below shows the "Questions" Edit Form. This is accessed via the Questionnaires entry in the System Entities screen.

Questions edit form  

Note that the layout of this edit form may have changed if it has been updated by your administrator, and additional actions, reports or resources may have been added.

Details of the Questions edit form

Questions edit form: Details  

  1. QuestionnairesID: The current question will be included in the Questionnaire selected Questionnaire.
  2. SectionsID: The current question will be displayed together with other questions with this "SectionID"
  3. OrderID: The current question will be placed in the Questionnaire based on this field. 
  4. ParentQuestionsID: The Questionnaire system includes conditional display of questions. This field is used to enable this functionality. The operation of this is explained below.
  5. ShowIfParentAnswer: The Questionnaire system includes conditional display of questions.  This field is used to enable this functionality. The operation of this is explained below.
  6. Question: The actual text of the question is entered here.
  7. Guidance: Any additional helpful guidance for either the ICO Officer or the person being questioned can be added here. Note that this field includes HTML Formatting, which is explained below.
  8. PossibleAnswers: If the "AnswersTypeID" is either "List" or "Multi-Select" the text in this field is used to provide a list of possible answers that the user can select.
  9. AnswersRequiringNote: Some answers may result in the need for an additional note. Answers selected from PossibleAnswers may match the text entered in this field. If they do, the user will be asked to add a note to the question.

Examples of operation of the Questionnaire system

AnswersTypeID  

Example of a "Yes-No" Question with the answer-options displayed at !.  

Example of a "Multi-Select" Question, with answer-options showing  

Answer Types

To make data-gathering easier, questions can be given AnswerTypeIDs, corresponding to different type of answer. The choice of Answer Type will determine the choices the user can make when answering the question.

The Questionnaire system includes the following Answer types:

  1. Currency: For recording money-values.
  2. Date: For recording the date or time an event occurred.
  3. Float: For recording "flaoting point numbers", these are numbers such as 12.34 or 5.666, which have a fractional part.
  4. Free Text: For recording text of any length and content.
  5. Integer: For recording whole numbers.
  6. List: Pick this choice to use the "Possible Answers" field (explained below). If "List" is used, the user will be able to pick one item from the list of possible answers.
  7. Multi-Select. Pick this choice to use the "Possible Answers" field (explained below). If "Multi-Select" is used the user will be able to pick one or more of the possible answers.
  8. Yes - No: For recording Yes/No, True/False anwers.
  9. N/A: Not Applicable: Note that this Answer-Type is present as an extra option to combine with other answer types.

ParentQuestion / ShowIfParentQuestion

ParentQuestion / ShowIfParentQuestion  

In some cases a question should only be answered depending on the answer of an earlier question. This shows an example of this working in an actual questionnaire.

  1. In this case the "Conditional Question" asks How much a farmer was paid per bag.
  2. This question references an earlier question "was the farmer paid a premium"
  3. The current question will be shown if the parent-question is answered "Yes".

Guidance: Entry in the Questions table

Example using text in the "Guidance" field of the question record  

Note: Within the guidance field basic HTML Tags including "B", "UL", "I" etc. can be used to format the appearance of the text.

This can be seen in practice on the right with the formatting of the entered text.

Resulting display in the system

Image above at 2., shows how the "Guidance" field will be displayed in use. Note how the HTML Formatting works.

Possible Answers

Possible Answers  

 

Note that possible answers are formatted with each possible answer on a separate line, and the whole answer enclosed in double quotes

Note that this means double quotes should not be used within the main text of any possible answers, as this will confuse the programming of the system.

"PossibleAnswers" are used with "AnswerTypeIDs" of either "List" or "Multi-Select"

Answers Requiring Note

Answers Requiring Note  

 

The Questionnaire system includes some special additional logic creating a mechanism where some answers must be accompanied by a note.

"AnswersRequiringNote" can contain any text, but to work reliably it should only be used where the value of the answer can be carefully predicted, for example with values like "Yes", "No" or an answer that exactly matches one or more lines of text from the "PossibleAnswers" column.

Note that "AnswersRequiringNote" can contain more than 1 value. Care should be taken to ensure that values which do not require a note are different from those which do. 

For example if two answers are "Five" and "More than Five" and the answer "Five" requires a note both answers would trigger the system to ask for a note, since both answers contain the text "Five". To fix this the two answers should be "Five" and "Six or More".

 

Data-schema: full details of the data-fields and their purpose in the FarmFields data-table

Field- Name / Data-type

Description / Purpose

Possible Values

Coding / Automation

ID (Primary Key) Unique number which identifies each record. Automatically set by Orixa, not under the control of users or developers.
QuestionnairesID (Link-ID) Links to the Questionnaires table Selected from list by User Will default to the currently open Questionnaires ID
SectionsID (Link-ID) Links to the QuestionSections table. Selected from list by User, list generated by the "QuestionSectionsQuestionnaireList" Resource. Will default to the currently open QuestionSections ID
OrderID (Integer) Self explanitory Entered by user Default value: 1
Question (Long Text) Self explanitory Entered by user
Guidance (Long Text) Self explanitory Entered by user
Justification (Long Text) Self explanitory Entered by user
CorrectAnswer (Long Text) Self explanitory Entered by user
DateCreated (Timestamp) Set to the exact date and time the record was first created. Automatically set by Orixa, not under the control of users or developers.
Current (true/false) Untick this field if the record is out-dated, no longer in use or discontinued. True / false Default value: true
FullName (Text) Read-Only, computed by Orixa, based on values in the database. Value generated by Orixa
AuthorID (Integer) Self explanitory Automatically set by Orixa, not under the control of users or developers.
AnswersTypeID (Link-ID) Links to the Types table Pick from list of possible Types values.
PossibleAnswers (Long Text) Self explanitory Entered by user
AnswersDefaultScript (Long Text) Self explanitory Entered by user
Required (true/false) Self explanitory True / false Default value: false
ParentQuestionsID (Link-ID) Links to the Questions table Selected from list by User, list created with the ParentQuestionsLUList resource.
ShowIfParentAnswer (Text) Programmatic field Set a text value. The current question will only be shown if the Parent-Question's Answer is identical to the value in this field.
AnswersRequiringNote (Free-Text) Programmatic field Set a text value. When the user provides an Answer they will be prompted to add a note if it is is identical to the value in this field.