OneScript
  • Welcome to OneScript
  • OneScript Overview
    • Dates and Times
    • Sets
    • Types
    • Fields
      • Helper Fields
      • Labels
      • Standard Text
    • Snapshots
    • State Management
    • Future Features
  • Get OneScript
  • Macro Overview
    • Macro Virtual Machine
    • Code Instructions
  • Standard Libraries
    • Core
    • Data
    • Interview Model
  • Linker Overview
    • Objects
  • Contact Us
Powered by GitBook
On this page
  • Languages
  • Piping
  1. OneScript Overview
  2. Fields

Labels

Labels are used to display things like questions, options, navigation text. Labels have a number of powerful properties.

Languages

Label are capable of holding multiple languages. When defining a field such as the following:

catGRCOptIn "<b>Do you have a <u>Genting Rewards Card</u>?</b>" 
        categorical [1..1] {
            r01 "Yes" factor (1),
            r02 "No" factor (2), 
            - "No Answer" NA factor (99)
        };

It is possible to declare multiple languages in this way:

catGRCOptIn { ENU:"<b>Do you have a <u>Genting Rewards Card</u>?</b>", 
                  ZHA:"您是否持有<u>云尊卡</u>?" } 
        categorical [1..1] {
            r01 { ENU:"Yes" , ZHA:"是" } factor (1),
            r02 { ENU:"No" , ZHA:"否" } factor (2), 
            - "No Answer" NA factor (99)
        };

By using the three letter character coding for a language it is possible to specify as many languages as required. To set the language that is used in a survey the following property in the Interview Model can be set

Interview.Language = "ENU";

If no language is declare in the Interview model then first language is automatically selected.

Piping

Labels make it possible to pipe in other values from different parts of the interview. For example:

name "What is your name" string;
welcome "Thank you {name} for taking the time to give us your feedback" info;

The welcome question pipes in the response to the name question.

PreviousHelper FieldsNextStandard Text

Last updated 1 year ago