> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/example-gallery/how-to-guides/how-to-guide-setting-up-questionnaire-calculators.md).

# How-To Guide: Setting Up Questionnaire Calculators

## Introduction

LogicNets allows you to create calculators for various functions in your applications. The answer to the question of "What is the best way to set up my calculator?" is......"it depends!" This topic outlines your choices from simple to complex, providing notes about each option.

When creating a calculator, it is useful to think about three things:

* The ease of creating the inputs in the LogicNets Designer and how the system presents them on the screen.

  *Simpler*: Few questions, question list without significant structure/organization into subsections *More complex*: Many questions, organized into subsections
* The ease of calculating the required results.

  *Simpler*: 1 or 0 scoring. No weights, averages, or special handling of skipped questions *More complex*: Subtotals for sections, weighted questions, percentage of maximum scoring, answer weights, subtotals for sections
* The ease of presenting a summary or detailed report of answers.

  *Simpler: Echo back of selected answers, presentation of final score* *More complex: Subtotals for sections, count of missing answers, presenting alternate "summaries" based on specific and overall scores*

For a short or simple calculator with only a few questions and simple scoring, you might lean towards the one of the first three approaches listed below. You can build longer, larger more complex calculators using simple building blocks, but this might get quite involved in terms of the steps. A more sophisticated approach can be helpful, one that uses loops and data containers.

## Approach to Creating Calculators

The following techniques have their pros and cons against these issues above.

### Radio Lists/Sliders and Final Calculation

* Use radiolists with caption = answer and value = points, or use sliders. See the [Q\&A Showcase Example Project](/release-9/example-gallery/how-to-guides/qa-showcase-and-example-project.md) for more information.
* Use calculations at the end to sum up scores. See the article and example project on [Numeric Calculations](/release-9/platform-documentation/process-node-parts/numeric-calculation.md).

**Pros**: Simple, easy to understand and troubleshoot

**Cons**: Longwinded for larger surveys, doesn't count questions answered, limited in terms of weighting and conditions

### Simple Collection Data Object and Count/Sum

* Use question\[1], question\[2] syntax for object name. See the [Introduction to Collections Example](/release-9/example-gallery/how-to-guides/how-to-guide-introduction-to-collections.md) project.
* Use count/sum collection at the end. See the article on [Count/Sum Items in Collections](/release-9/platform-documentation/process-node-parts/count-sum-items-in-collection.md) part.

**Pros**: Simple, especially sum/count, easy to present summary of answers

**Cons**: Not great for downstream processing, and note collections are harder for novice Designer users to use

### Group Calculations

(see [this](/release-9/platform-documentation/process-node-parts/group-calculations.md) article)

* Use container in data object
* Use group calculations part to generate analytical data in context

**Pros**: Great for longer lists of questions with same scale, counts answers, weighting

**Cons**: Not good for conditions, can be difficult to present answers back

### Smartgrids

(see [this](/release-9/example-gallery/how-to-guides/how-to-guide-repeating-inputs.md) article)

* Create simple question list, and use smartgrid to present
* Use [get statistics from collection](/release-9/platform-documentation/process-node-parts/get-statistics-from-collection.md) process part to retrieve sum, count, max, min, and average values or devise more sophisticated calculations using [Numeric Calculations](/release-9/platform-documentation/process-node-parts/numeric-calculation.md) and looping.

**Pros**: Great for same measures across multiple topics, creates formatted box structure in UI, can reuse measures logicnet

**Cons**: Only good for short, discrete text (e.g. Never | Sometimes | Often), usually needs more meta data to do conditional calculations of results. See *Complex Collections* below.

### Complex Collections

(see [this](/release-9/example-gallery/how-to-guides/how-to-guide-query-collection.md) example project)

* Broader application of smartgrids, similar data structure
* Create section\[1].question1, 2, 3, section\[2].question1, 2, 3 etc. as the data object structure
* Create a simple question list and use call node context path to repeat questions for different topic

**Pros**: All the benefits of simple collections and you can add other data for reporting, works really well with loops across multiple questionnaire subsections, repeated questions for prior answers, can use query collection to extract results with conditions

**Cons**: Difficult for novice Designer users to grasp, harder to build and troubleshoot

### Data Tables

* Create table with question, weight, and answer options (if specific)
* Each radiolist presents question from a table
* You can write answer back to results table

**Pros**: Great for highly varied questions, includes weights, results easily exported to XL for further analysis

**Cons**: Difficult to troubleshoot, nodes do not contain displayed values

## Further Help

Please contact your LogicNets Representative if you would like to discuss and review your design for a calculator in LogicNets.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/example-gallery/how-to-guides/how-to-guide-setting-up-questionnaire-calculators.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
