Columns (Client API reference)

Columns contain data in the model-driven apps form or grids. Use the formContext.data.entity.attributes collection or the formContext.getAttribute shortcut method to access a collection of columns. For more information about collections, see Collections (Client API reference).

To access a column within the collection, you pass either the name (string) or the index value (number) of the column as an argument to the method. For example: formContext.getAttribute(arg). If no argument is specified, it will return a collection of all attributes on the form.

Columns are categorized by type. You can determine the type of the column by using the getAttributeType method. Certain column methods are only available for specific types of columns.

This topic provides information about the methods available per column type.

All column types

 

 

Boolean column type

In addition to the methods available for all column types as explained earlier, the following method is available only for the boolean column:

Lookup column type

In addition to the methods available for all column types as explained earlier, the following method is available only for the lookup column:

Choices and choice column types

In addition to the methods available for all column types as explained earlier, the following methods are available only for the choices and choice columns:

Number column type (decimal, double, integer, money)

The following methods are available only for the decimal, double, and integer columns:

String column type

In addition to the methods available for all column types as explained earlier, the following method is available only for the string column:

Understand Xrm object model
Controls (Client API reference)