0

Report-Item Form Part

Description

The Report-item is a form part used in the Assessment Framework. It allows you to "echo back" the selections or text entries from users on the left side of the screen as reports on the right side of the screen. It also provides functionality to control the way the system displays the user's answers or to hide the heading for those items the user didn't answer.

Node Type: This is a form-part node.

Used With: Assessment Framework

Example

To see examples of report item parts in use, check out the example project Q&A Showcase here. Download and install the project, run it under TEST to see how information can be presented, then inspect the report folder logicnets to see the specific configurations used.

Tips and Tricks

Using the Part

This part displays the selections users make in other form parts, so user selections/answers must be available in the project. You will most often use this part in logicnets you create in the reports subfolder of your project.

Think Through your Report Design Before Building Questions

While questions are the basis of the data collection in your application, it is important to think through how these questions will translate into a report before modeling the questions. Doing this makes presenting the results of those questions in a report much easier. For example, the question “Is the sky blue?” has either a "yes” or “no” answer. If you want to display "Sky: Blue" in your report, however, you would want to change the question to something like "What color is the sky?" and provide such answer options as "Blue” or “Another color, but not blue”.

Displaying Captions Instead of Values

With radio and checklist questions you can also display the caption instead of the value of the data object. So, in the above example, another way to present the right information in your report is to set up the question as follows:

Question: "Is the sky blue?"
Answer Options:
Caption: Yes Value: Blue
Caption: No Value: Not Blue

In using the report-format part and choosing to display captions you can display "Sky: Blue" in the report, even though the user answered a Yes/No question.

Use Show Caption Options to Simplify Reporting

The report-item form part gives you two possibilities for displaying the results of a question: "When source has a value" and "always". If you choose “when source has a value” the system will only display the associated caption if the user answers the question. This is very handy for optional questions, or if the intention is for the user to see their report “build up” as they answer questions.

However, if you want to lay out the report like a form with captions always displayed and space for answers--to allow the user to see the full extent of the final report at the start--then you would set this option to “Always”. You can choose one or the other item by item to achieve the desired effect in your report.

Setting the Parameters

Basic Functions
These are the baseline fields that have to be filled out for the report-item to work.

Field Name Description/Use Type/Options
Data source

This is the answer or text you asked the user for that you want to display in your report. It is the data object you identified; for example, if you asked your user for her first name, it would be firstname.

If you use the ellipsis () to choose Data source from the data model the system will complete additional details—such as type—automatically. 

Data object
Data source type This tells the system whether to show the value the user entered/selected or the caption assigned to their selection option in Data source. Note: If you select "Caption" but your item does not have an assigned caption the data item will not display.

- Value
- Caption

Caption

If your item does not contain a caption but you want to display one in your report you can enter it in this field.

When choosing the data source from the data model the caption is automatically populated with the question, but you can edit this field to include any alphanumeric text, HTML codes, and other variables from the context (the syntax is $(variable_name)).

Text
(optional)
Escape $(..) caption When checked any HTML in the caption field is escaped - meaning the field is interpreted with any HTML elements showing on screen. When this is unchecked, the caption field contents are presented exactly as written in the field.

Checked | Unchecked (default)

Show caption With this field you tell the system to either show the caption you have for the item by selecting "Always", or to hide the caption if the user did not provide an answer to the question. To do this you use "When source has a value".

- When source has a value
- Always

Prefix You can opt to put information before the user's answer. For example, if you have asked in the question for a unit of measure you could put "mm" or "inches" after the user's answer in the report. This field will accept HTML and other variables in the $(variable_name) format. Enter a space first in the postfix field to force a gap between the user's answer and the provided postfix. Text (optional)
Postfix You can opt to put information after your user's answer or leave it blank; for example, if you have asked in the question for a chapter or page number you could put "Chapter" or "Page" before the user's answer in the report. This field will accept HTML and other variables in the $(variable_name) format. Enter a space after the prefix field to force a gap between the provided prefix and the answer input box. Text (optional)
Type This tells the system what type of data is provided with the data source. The system displays additional formatting options for some of the data sources; for example, if the data source is a collection the system provides options for displaying a list of items.

- text
- number
- collection
- date
- date_time
- currency

Character limit To limit the number of characters the user can enter, specify the maximum number of characters (including spaces) here.

Number (optional)

Data source type = number or currency: If the data source type is "number" or "currency" the system will display the following options.

Currency symbol
(not available with type = number)

Enter the text/symbol for currency. e.g. GBP or $

Text

Symbol location
(not available with type = number)

Choose the location for the symbol as follows:

* system default: choosing this option accepts the defaults for round/truncate as specified in the SystemConfig package. Using this option allows the Designer to maintain and/or update consistent choices across the application

* Prefix: show the symbol in front of the number

* Postfix: show the symbol after the number

- system default
- Prefix
- Postfix

Decimals  Enter the number of decimal places required in the answer.

Number

Round/truncate

 Choose from the options available:

* system default: choosing this option accepts the defaults for round/truncate as specified in the SystemConfig package. Using this option allows the Designer to maintain and/or update consistent choices across the application

* - (no round/truncate)

* Truncate: truncates the number to the specified number of decimals

* Round: rounds the number to the specified number of decimals above

* Round whole: rounds to the number of digits to the left of the decimal point

- system default
- (none)
- truncate
- round
- round whole
Decimal separator

Choose from the options availlable:

* system default: choosing this option accepts the defaults for round/truncate as specified in the SystemConfig package. Using this option allows the Designer to maintain and/or update consistent choices across the application

* . (dot): will show numbers as 123.456 for example

* , (comma): will show numbers as 123,456 for example

- system default
- dot
- comma
Thousands separator

Choose from the options availlable:

* system default: choosing this option accepts the defaults for round/truncate as specified in the SystemConfig package. Using this option allows the Designer to maintain and/or update consistent choices across the application

* . (dot): will show numbers as 123.456 for example

* , (comma): will show numbers as 123,456 for example

- system default
- dot
- comma
Negative Numbers

Choose from the options available:

* system default: choosing this option accepts the defaults for negative numbers as specified in the SystemConfig package. Using this option allows the Designer to maintain and/or update consistent choices across the application

* No: negative numbers will not be shown with parentheses, e.g. -123456

* Yes: negative numbers will be shown with parentheses, e.g. (123456)

- system default
- No
- Yes
Round whole  If you click this checkbox the system will round the user's answer to the nearest whole number.   Checked | Unchecked
Data source type = collection: If the data source type is "collection" the system will display the following options.
List view  This allows you to set the format options for displaying your list.

- Comma
- *-separator
- custom
- comma and
- bullets
- list
- quoted and comma separated
- no delimiter

Key This field specifies the object within the collection you want to display in your report. As an example, if you have a collection with user_choice[1].preference and user_choice[1].state enter "state" in this field to show only that set of objects. Text
Value template

You can use this field to display multiple items from a collection in your report. Each key or object has to be defined as $(object). Other text and HTML is also allowed in the field, but you should not include contextual variables that do not exist in the collection. Example: a value template of #$(preference) - $(state) would deliver
#1 – NY
#2 – CA
#3 – DC

It is also possible to include div classes and/or column HTML elements to create and style these values in a table format in this template, with the following option "Do not escape HTML" checked

Text
Do not escape HTML

When checked any HTML in the caption field is escaped - meaning the field is interpreted with any HTML elements showing on screen. When this is unchecked, the caption field contents are presented exactly as written in the field.

Checked | Unchecked
Data source type = date or date_time: If the data source type is "date" or "date_time", the system will display the following options.
Format Select either standard date/time or EPOCH time (time as the number of seconds that have passed since Thursday 1 January 1970 00:00:00 UT - standard
- EPOCH
Time zone Select either the server timezone or GMT as the timezone for use in reporting this data element. - server
- GMT
Date format This tells the system how to display the date. You can use options such as dd-mm-yy to show two digits for the date, two digits for the month, and two digits for the year with a dash between each. Note: you must use lowercase letters. Text
Date format (when only month/year are available) This tells the system how to display the date if only the month and year are available. Enter your formatting into the field using options such as mm/yy to show the month with two numbers and the year with two numbers; for example, February 2019 would display as 02/19. Note: you must use lowercase letters. Text
Date format (when only year is available) This tells the system how to display the date if only the year is available. Enter your formatting into the field using either yy or yyyy to show the year with all four numbers or with only to numbers. As an example, if you put yy the system will display 2019 as 19. Note: you must use lowercase letters. Text
Time format
(type = date_time only)
This tells the system which format to use to set the time. You can use options like %I:%M %p to show the Meridian time. See the table below for other acceptable formats.  Text
Date/time separator
(type = date_time only)
Enter any code or text to be used between the date and time, e.g. [space] or [at] for Jan 1st 2021 at 09:00am Text

Acceptable Date Formats

See the Format Dates article for details of the codes you can use to create acceptable date formats, but some common ones are listed below.

%a abbreviated weekday name (e.g., Wed)
%A full weekday name (e.g., Wednesday)
%b abbreviated month name (e.g., Sep)
%B full month name (e.g., September)
%c date and time (e.g., 09/16/98 23:48:10)
%d day of the month (16) [01-31]
%H hour, using a 24-hour clock (23) [00-23]
%I hour, using a 12-hour clock (11) [01-12]
%M minute (48) [00-59]
%m month (09) [01-12]
%p either "am" or "pm" (pm)
%S second (10) [00-61]
%x date (e.g., 09/16/98)
%X time (e.g., 23:48:10)
%Y full year (1998)
%y two-digit year (98) [00-99]

Advanced Functions

These are the higher-level functions the user can activate in the part.

Using Value Templates

Presenting complex array/collection information can be done very neatly in tabular format by using DIVs and/orandelements in the value template. See How to Guide for Query Collections for an example of this.

Use Postfix to Present a Second Variable

Because the postfix field can take $(variable_name) inputs, it is possible to easily display multiple user answers and/or additional variables on the same line.

In the example where you ask the user which states they have lived in, you could use a process node to count the number of states the user selects in a data object called "count_of_states". You can then convert the us_states_lived_in collection into a text string called "states_as_text". Use the report-item part and display “count_of_states” but put "($(states_as_text))" in the Postfix field. The report would display States Lived In: 3 (NY, CA and DC).

An alternative example would be to use the postfix to display a total count; for example, if you wanted to display the number of items a user selected from a total list. You could display a list of 10 options ("total_observations") and count the number of options the user selected ("selected_options"). In your report-item you could specify the data source as "selected_options" and the postfix as " out of $(total_observations)" to display the following: Selected items: 3 out of 5.

Using Collections Instead of Individual Data Objects

The report-item part handles collections very efficiently, and more so than the other variable construction of a group_name and object name. For example, if you want to ask the user which three states he wants to visit you can choose to store answers as "user_choice.first_state", "user_choice.second_state", and "user_choice.third" state. To present these values you would have to use three report-item parts. Alternately, you could store the user's answers as a collection.

user_choice[1].preference = 1
user_choice[1].state = “NY”

user_choice[2].preference = 2
user_choice[2].state=”CA”

user_choice[3].preference = 3
user_choice[3].state=”DC”

With this construction you can use one report-item form part to display the user's answer, and you can opt to display the answer in different ways, including the following:

Favorite States to Visit: NY, CA, and DC

Or

Favorite States to Visit:
#1 – NY
#2 – CA
#3 – DC

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 5 mths agoLast active
  • 23Views
  • 2 Following

Home