NC Choice Grid

Not yet released: this component will ship in an upcoming Native Rent package version.

NC Choice Grid is a matrix of questions. Rows are the items, and columns are the choices. People give one answer per row (radio) by default, or several per row (checkbox) if you set Selection Mode to multi. It outputs the answers as one text, as a text collection, and as a count of answered rows.

Use it for a condition check or inspection on a Rentable, where each item needs a rating.

A required NC Choice Grid, table layout on desktop: open rows outlined, "0 of 4 answered", and "Answer every row to continue."
A required NC Choice Grid, table layout on desktop: open rows outlined, "0 of 4 answered", and "Answer every row to continue."
NC Choice Grid, cards on a phone: a rating grid with Cleanliness set to Great and Staff set to OK.
NC Choice Grid, cards on a phone: a rating grid with Cleanliness set to Great and Staff set to OK.

Layouts

LayoutAPI valueWhat the user seesExample
AutoautoA table on a wide screen. On a phone or when the component is under 600 px wide, each row becomes a card with block buttons that show the column labels.A condition check used on desktop and phone.
TabletableA table. A table with many columns scrolls sideways inside the component.A wide desktop inspection screen.
CardscardsOne card per row, with block buttons for the choices.A narrow column or a phone.

Rows, columns, and answers

Rows and columns come from comma-separated text. Use \, for a comma inside a label. Optional Row Values and Column Values can be given in the same order. Blank value entries use the label.

A Text collection can be used instead. When the collection has items, it replaces the text, and each label is also its value.

Duplicate values are dropped. The first entry is kept.

One answer or several: Selection Mode single (the default) works like a radio button per row. Tapping the picked answer again clears that row. With multi, rows work like checkboxes.

Answers (value) outputs the values, not the labels, as one text such as Tires=Good; Body=Fair. With multi it looks like Body=Fair,Damaged. It keeps row and column order. It is empty (null) when nothing is answered. When no Row or Column Value is set, the label is used as the value. For example, a rating grid with Column Values 1,2,3 outputs Cleanliness=2.

Answers (Collection) has one Row=Choice entry per answered row, in row order, for a Loop. With multi, that entry can be Row=A,B.

Answered Rows is the number of rows with an answer.

A progress line such as "2 of 4 answered" shows under the grid.

Mapping Answers in prefills the grid. Rows or columns that no longer exist are dropped.

Do not put =, ; or , in values. Those characters separate the answers. If a label needs one of them, give the row or column a plain value in Row Values or Column Values.

Required means every row needs an answer. Next shows "Answer every row to continue." and outlines the rows that are still open. Each outline clears as soon as that row is answered.

Navigate After Selection works with single selection only. The flow can move on when the last open row is answered.

Without rows or columns, the component shows a setup message.

Add it to a screen

  1. Add NC Choice Grid to the screen. Set Label, and turn on Required if every row must be answered.
  2. Enter Row Labels and Column Labels, or map a Text collection for each.
  3. Optionally enter Row Values and Column Values in the same order as the labels.
  4. Set Selection Mode to multi if a row can have more than one answer.
  5. Map Answers in and out of the same variable to prefill or read the grid. Use Answers (Collection) in a Loop, and Answered Rows if you need the count.

Example

A condition check on a Rentable:

Validation

Next is blocked when the grid is required and any row is still open. The component shows "Answer every row to continue." or your Required Message. Open rows are outlined, and the outline on a row clears when that row is answered. The message shows under the component, not as a Flow error.

When nothing is answered, Answers is sent to the flow as empty (null), not as empty text.

Phone and desktop

Auto shows a table on a wide screen, and one card per row with block buttons on a phone or when the component is under 600 px wide. The block buttons are at least 44 px tall. 44 px touch targets also apply at 600 px or less, on a phone, or on a touch screen. Map Answers in and out of the same variable to keep the answers if the screen is re-created. NC Choice Grid has no Color Map.

Each row is a radio group (single) or a group (multi), named by its row label. Each choice is named "Row: Choice."

Limits

Properties

PropertyAPI nameDefaultDescription
LabelfieldLabel(blank)Question or field label shown above the grid.
Help TexthelpText(blank)Optional hint under the label.
Row LabelsrowLabels(blank)Comma-separated items, one per row, e.g. Tires,Body,Engine. Use \, for a comma inside a label.
Row ValuesrowValues(blank)Optional comma-separated values in the same order as Row Labels. Blank entries use the label.
Row Labels (Collection)rowLabelsCollection(blank)Optional Text collection of row labels (also used as the values). Used instead of Row Labels when it has items.
Column LabelscolumnLabels(blank)Comma-separated choices, one per column, e.g. Good,Fair,Damaged.
Column ValuescolumnValues(blank)Optional comma-separated values in the same order as Column Labels. Blank entries use the label.
Column Labels (Collection)columnLabelsCollection(blank)Optional Text collection of column labels (also used as the values). Used instead of Column Labels when it has items.
Selection ModeselectionModesinglesingle (default: one answer per row, radio) or multi (several per row, checkbox).
RequiredrequiredfalseBlock Next until every row has an answer. Rows still open are outlined.
Required MessagerequiredMessage(blank)Optional. Blank uses the translated default.
DisableddisabledfalseShow the grid read-only.
Layoutlayoutautoauto (default), table or cards. Auto: one card per row with block buttons on phones or under 600px, a table on wide screens.
Accent ColoraccentColor(blank)Selected and focus color, e.g. #0B5CAB. Hex, rgb() or a color name. Lightened or darkened until it reaches 3:1 against the tile color (or the theme surface if no tile is set). Also tints the focus ring and the selected/highlighted row. Blank follows the org theme (and dark mode).
Background ColorbackgroundColor(blank)Optional color behind the whole component.
Text ColortextColor(blank)Optional. On choices and results: used as-is on the theme surface, or checked at 4.5:1 against a tile color if one is set. On the label and help: checked at 4.5:1 against the background if one is set; otherwise dark or white text is picked automatically.
Text Sizesizemediumsmall, medium (default), large or xlarge.
Corner Shapeshaperoundedrounded (default), square or pill.
Alignmentalignstartstart (default), center or end.
Navigate After SelectionnavigateOnSelectnonenone (default), next, back, finish or pause. Single selection only: when the last open row is answered the Flow can move on. Next and Finish check Required first; Next becomes Finish on the last screen.
Available ActionsavailableActions(blank)Set by Flow; do not map.

Outputs

OutputAPI nameTypeDirectionDescription
AnswersvalueTextInput and outputAll answers as one text: Row=Choice; Row=Choice (multi: Row=A,B), using the values. Map in to prefill, out to read. Empty when nothing is answered.
Answers (Collection)answersText collectionOutputOne Row=Choice entry per answered row, in row order, for a Loop.
Answered RowsansweredCountNumberOutputNumber of rows with an answer.

Shared behavior

Layout and width, required messages, colors, navigation, data sources, translations, accessibility, and the setup panel work the same way on every component. See NC screen components.

To copy this component's settings to another screen, use Copy settings at the top of its setup panel. See Copy settings.