Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intermediate Designer 1: Special Qs, Validation and C#

Similar presentations


Presentation on theme: "Intermediate Designer 1: Special Qs, Validation and C#"— Presentation transcript:

1 Intermediate Designer 1: Special Qs, Validation and C#
Use of CAPI for agricultural surveys Intermediate Designer 1: Special Qs, Validation and C#

2 Overview Special question types (GPS, barcode, picture)
Data validation Basic C# syntax for creating validation and enablement conditions

3 Learning Objectives Know what validation conditions and messages are
Apply basic C# syntax for creating validation and enablement conditions

4 Special question types

5 Special question types
3 types for now: GPS Barcode Picture

6 Special question types: GPS
Designer Interviewer

7 Special question types: Barcode
Designer Interviewer

8 Special question types: Photo
Designer Interviewer

9 Data validation

10 Data validation: description
Data validation expressions are to: Confirm responses are consistent, and/or responses meet realistic expectations Examples A man cannot be pregnant. *Consistent w/ gender, enabled when household member is male. No one can be more than 110 years old, and younger than 0. *Realistic expectations (likelihood). These expressions are written in C# in the validation condition field.

11 Data validation: description
What happens when validation is violated? A warning message is shown to enumerator

12 Data validation: description
Message enumerator sees if condition violated

13 Data validation: description
Value that violates condition Message enumerator sees if condition violated

14 Basic C# syntax for creating validation and enablement conditions

15 Data validation: Building expressions
How? Connect a variable name with values or another variable using logical operators. Connect expression creating multiple conditions using “||” or “&&” Example age > 18 || age < 65

16 Data validation: Building expressions
Steps: Identify unleash and recipient question Refer to operator table to identify operator Create expression using operators and variable names of unleash and recipient questions.

17 Data validation: Operators
Description > Greater than < Less than == Equal too != Not equal to <= Less than or equal to >= Greater than or equal to && and || or variableName==1 || variableName==2 (single select) contains in variableName.InList(2, 3) variableName.Contains(1) (multiselect) single values variableName.ContainsAny(1, 3) (multiselect) single values, multi values Operators depend on type of UNLEASH QUESTION!

18 Data Validation examples

19 Data Validation examples
Validation condition, we want the response to be less than 100 and positive.

20 Enablement and validation

21 KEY CONCEPT AHEAD

22 Enablement and validation
Enable only if there is a manager Validate that value is less one 100 and positive.

23 Enablement and validation

24 Enablement and validation

25 Enablement: Another Example

26 Data validation: Operators
Description > Greater than < Less than == Equal too != Not equal to <= Less than or equal to >= Greater than or equal to && and || or variableName==1 || variableName==2 (single select) contains in variableName.InList(2, 3) variableName.Contains(1) (multiselect) single values variableName.ContainsAny(1, 3) (multiselect) single values, multi values

27 Enablement and validation

28 Questions? Test questions:
What is the difference b/t a validation condition and an enablement condition? When do you use validation conditions? Can you take a photo during an interview? What information does the tablet record for a geo-reference question?


Download ppt "Intermediate Designer 1: Special Qs, Validation and C#"

Similar presentations


Ads by Google