Expand description
Choices from a repeated group (schema.md, “Choices from a repeated group”).
A choice field whose items is a group source { from, label? } takes its choices from
the rows of a repeated group of the same form. This module checks the declaration and
reads the choices from the data; the generator lists them and the validator checks a
value against them (validation-rules.md, “Values”).
Structs§
- Group
Choice - One choice of a group source: the canonical text of a row’s value and its label text.
Enums§
- Group
Choices Error - Why the choices of a group source could not be read.
Functions§
- group_
choices - The choices of a group source for the root
data: one per row of the group in data order whose value gives a non-empty canonical text, each value once, labelled with the text of itslabelfield or else its value. A group missing from the data gives no choices. - group_
source_ failure - The message of the first rule that the group source of
fieldat the declarationpathbreaks under the rootproperties, orNone. The members ofitemsare checked in declaration order, then the field, thenfrom, the type of its field,labeland then the type of its field. - group_
source_ repeat - The input failure message of the first row of a checked group source, in data order, whose
choice value repeats a literal choice (CUSC-089) or that of an earlier row (CUVR-087), or
None. A source whosefromis not of the declared shape has no rows. - is_
group_ source - Whether
itemsis a group source: an object with the memberfrom. - scalar_
child - Whether
childrenders one scalar value: an object whose type is notgroup, that has nopropertiesmember, is not repeated and has nolang.