2.80 .dataselecttype[attribute]

This attribute defines the data type to which the values of the Data Model attribute specified as index are converted.

Definition

  • Data type

    datatype

  • Access

    get, set

  • changed event

    no

If .dataselecttype is not specified, the Data Model attribute will contain a vector of strings (data type vector[string]).

If the conversion fails, retrieval of the values is canceled with an error.

Example

The following dialog part defines the three Data Model attributes .Name, .Female and .Name3.

dialog D
...
document Doc
{
  doccursor DocCur
  {
    .dataselect[.Name] "..person";

    .dataselect[.Name3]     "..person[.birthyear=\"1978\"][3]";
    .dataselecttype[.Name3] string;

    .dataselect[.Female]      "..person";
    .dataselectattr[.Female]  "female";
    .dataselecttype[.Female]  boolean;
    .dataselectcount[.Female] integer;
  }
}
...

The attribute .Name collects the texts of all person nodes in a string vector, while the attribute .Name3 only contains the name of the 3rd person born in 1978 as a scalar of type string.

With the .Female attribute, the respective node attributes of all person nodes are retrieved through the DocCur.attribute["female"] ] access, converted to boolean and stored in a vector.

Availability

Since IDM version A.06.01.b

See also

Attribute .dataselectcount[attribute]