({{, (RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement])[elem] 
represents a rectangular array of elements of type spec in an interpreter, API or form specification.}, {, (RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement])[elem,{maxrows,maxcolumns}]
represents a rectangular array of elements of maximum size maxrows×maxcolums.}, {, (RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement])[elem,{{minrows,maxrows},{mincolumns,maxcolumns}}]
represents a rectangular array of elements of dimensions between minrows×mincolumns and maxrows×maxcolums.}})

OpenersNotesSection(Spacer1)Details

In the context of (RefLink[Interpreter, paclet:ref/Interpreter]), spec can be any specification used for (RefLink[Interpreter, paclet:ref/Interpreter]), including (RefLink[CompoundElement, paclet:ref/CompoundElement]) or (RefLink[RepeatingElement, paclet:ref/RepeatingElement]).

In the context of (RefLink[FormObject, paclet:ref/FormObject]) and (RefLink[FormFunction, paclet:ref/FormFunction]), spec can be any specification used for forms, including the full association.

OpenersPrimaryExamplesSection(Spacer1)Examples  (9)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Use (RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement]) to interpret a matrix of data:

Interpreter[RectangularRepeatingElement["Number"]][{{"1", "2.5", "3.2"},{"11", "15", "12.2"}}]

(RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement]) fails on data that is not rectangular:

Interpreter[RectangularRepeatingElement["Number"]][{{"1", "2.5", "3.2"},{"15", "12.2"}}]

Use it in an (RefLink[APIFunction, paclet:ref/APIFunction]) to collect complex data:

api =CloudDeploy @ APIFunction[
"data"->RectangularRepeatingElement["Integer"],
NullSpace[#data]&,
AllowedCloudParameterExtensions->{"json"}
]

URLExecute[api, {"data__json" -> "[[1, 2], [2, 4]]"}]

OpenersExampleSection1(Spacer1)Scope  (2)

The second argument is used to limit the size of the input:

Interpreter[RectangularRepeatingElement["Integer", {2, 1}]][{{"1","2","3"}}]

Interpreter[RectangularRepeatingElement["Integer", {2, 1}]][{{"1"},{"2"}}]

Limit the minimum size of the array:

Interpreter[RectangularRepeatingElement["Integer", {{2, 100}, {2,100}}]][{{"1","2","3"}}]

Interpreter[RectangularRepeatingElement["Integer", {{2, 100}, {2,100}}]][{{"1","2"},{"3","4"}}]

OpenersExampleSection3(Spacer1)Properties & Relations  (3)

(RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement]) can be used in conjunction with any interpreter specification:

Interpreter[RectangularRepeatingElement["Integer"|"Country"]][{{"1", "italy"}, {"armenia", "5"}}]

Including (RefLink[RepeatingElement, paclet:ref/RepeatingElement]):

Interpreter[RectangularRepeatingElement[RepeatingElement["Number"]]][{{{"1","2","3"},{"1"}},{{"5", "6"}, {"7"}}}]

And (RefLink[CompoundElement, paclet:ref/CompoundElement]):

Interpreter[RectangularRepeatingElement[CompoundElement[<|"country" -> "Country", "city" -> "City"|>]]][{{<|"country" -> "angola", "city" -> "lahore"|>, <|"city" -> "bangkok", "country" -> "canada"|>}}]

OpenersExampleSection4(Spacer1)Possible Issues  (1)

Constructs like (RefLink[FormFunction, paclet:ref/FormFunction]) and (RefLink[FormPage, paclet:ref/FormPage]) do not show a special interface for (RefLink[RectangularRepeatingElement, paclet:ref/RectangularRepeatingElement]):

CloudDeploy[
	FormFunction["data" -> RectangularRepeatingElement["Integer"],
	NullSpace[#data]&
]]

Use JSON to fill in the fields:

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[SquareRepeatingElement, paclet:ref/SquareRepeatingElement])  ▪  (RefLink[RepeatingElement, paclet:ref/RepeatingElement])  ▪  (RefLink[Interpreter, paclet:ref/Interpreter])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Setting Up Input Interpreters, paclet:guide/InterpretingStrings])}})}})