and

The keyword and serves two distinct purposes in Envision.

(boolean and boolean) 🡒 boolean

When found in an expression, and is the logical AND operator.

Example:

table T = with
  [| as A,  as B  |]
  [| false, false |]
  [| false, true  |]
  [| true,  false |]
  [| true,  true  |]

show table "" a1b4 with
  T.A
  T.B
  T.A and T.B

See also

and, multi-table reads

When found at the end of a read statement, and introduces a second read statement. This allows to have the content of the same files injected into several tables.

Example:

table Variants = with
  [| as Product, as Color |]
  [| "shirt", "white" |]
  [| "shirt", "pink" |]
  [| "pants", "blue" |]
  [| "pants", "black" |]
  [| "hat", "red" |]

show table "Variants" export: "/sample/variants.csv" with
  Variants.Product
  Variants.Color

The above script creates the flat file variants.csv.

read "/sample/variants.csv" as Products with
  Product : text
and as Variants with
  Product : text
  Color : text

show table "Variants" with
  Variants.Product
  Variants.Color

The above script injects variants.csv into the tables Products and Variants respectively.